0 like 0 dislike
2.8k views

Please write a program that receives 'A' then outputs 'A'-'Z'. However, if a vowel (A, E, I, O and U) appears, it will show '?' instead.

Example(template)

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
	char a;                      // can be changed
	printf("Enter your input:"); //DO NOT CHANGE
	scanf("%c",&a);
	
    // Your conditions start from here
	
	return 0;
}

 

Input

Enter your input:A

Output

Enter your input:A
?BCD?FGH?JKLMN?PQRST?VWXYZ

 

[Exercise] Coding (C) - asked in Chapter 3: Branching, Looping and Functions by (5.9k points)
ID: 30241 - Available when: Unlimited - Due to: Unlimited
| 2.8k views

24 Answers

0 like 0 dislike
Hidden content!
#include **** * ** * **
#include **** ***** * **

int main(int argc, char *argv[]) {
**** * char a; * ** ** * ** * ** *** * * *** * *** ******* ** * * ****** *** * * * ** ** * ****** ** * ** * ** ** ** can be changed
*** * * ** ***** * ** * your ** ***** //DO NOT CHANGE
** * ** * *** * * * * ** * *** * **
* * ** *****
******* * *** * **** ** * * ** Your * * start from here
* *** ** * char i;
*** ***** if(a == 'A'){
**** **** *** * ** ****
** ** * *   * *** * * * **** ** ** **** * * ** * *
*** * ** *** * * **** ***** * * *** * * * * * * * * **
* *** * **** * ***** ** * ** * * * * ** * * else
** * * **** * * ** *** * *** * ** * * * **** ****
* *** * *** }
}
* ** ** ** return 0;
}
100/100 answered by (221 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
**** * * * * *** *** a; * ** **** * * ** ** * * * *** * ** * *** ******* * **** * ** * ** * * ** ******** *** ** * * * * ** * * * can be changed
* * *** ** ** **** * ** * * * your input:"); //DO NOT CHANGE
*** ** ** * * * **** **** * * * ** **
    
**** ** **** ** * ** ***** * * *
* * ** *** ** * *** ** * **** * * * * * * ***** ** ** * **
** * * * ** * ** ** ***** * * ***
* *** ** * **** *** ** ** **** * *** * ** **** ** *** * ***** * *** **** *
* * * ** ** ** ** ***** ** **** * * *** ** *
* ***** * * *** ** * * ** ** * *** ** * *** * **** * ***** ** a);
** * * ** * ** *** ** *
    
****** * ** * *** * * 0;
}
100/100 answered by (183 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include * * * * *
#include * ********

int main() {
*** * ** char a;
** * * * * **** **** ***** your **** * * *
** * * * * ** *** ** **** ** * ***
*******  
* *** *** **** *** ** * * * *** *
*** *** ** * ** ** * *** ** * *** **** ***** * * **** * * *
* **   }else{
* * *** ** *   ** * *** ** ** ** ******** * * * *** * *** *
* ** ** * * }
* ** *
** * return 0;
}
100/100 answered by (244 points)
0 0
prog.c:1:1: error: expected identifier or '(' before 'if'
 if(a=='A'||a=='E'||a=='I'||a=='O'||a=='U'){
 ^~
prog.c:3:3: error: expected identifier or '(' before 'else'
  }else{
   ^~~~
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
answered by (244 points)
0 1
prog.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
 gg
 ^~
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {

* * * * * * ***** * ** ** a;
****** * * *** * ** * ** ** *
**** * * * ** * ** *** ** * * **** ** &a);
* ** * * * ** * ****
** * *** * * ** * * <= 'Z')
* * ** ** *
* * * ** *** * ** *** ** ** * * **** * * == 'A'|| a == 'E' || a=='I' || a=='O'|| a=='U')
* *** * * **** * * * ** ** *** * * *** ** ** * * *** * * * *** *** **** ** ** * ** **
** * * ** ** * * * * *** * * * * * * * * *
* ***** ** ** * ***** ** ** * * ** * ** * ** ** ** * * ** * *** ** * a);
* * ** * * * * * ** * ** ** ** * ****** **
* ** * ********** * *
50/100 answered by (183 points)
0 0
prog.c: In function 'main':
prog.c:17:5: error: expected declaration or statement at end of input
     }
     ^
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {

*** * * ** **** * * * ** a;
** ** * ** * ** **** * *
*** * * ** * ** * * * * *** * * * *** &a);
* * * ** *
** * * ** * *** * *** **** <= 'Z')
** ******** * ****
* * ** * * *** ***** * * * *** ** ** * * * == 'A'|| a == 'E' || a=='I' || a=='O'|| a=='U')
* *** * * ** **** *** ** ** * ** *** ** ** ** ** ** ** * ** *** ** * **** * * ** ***
** * * * * ***** * * * * ***** * * * ** ** *
** * * ** * ** * ** *** * * * * ** ** *** ** * * **** **** ** * ** a);
*** * ** *** * * **** ***** ** * *** * * **
** *** * * * *

* * * ** ** * ** * * * 0;
}
100/100 answered by (246 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {

* ** * ******* * * *** a;
* ** *** * * ** *** *
*** * * * ** *** * * ***** *** **** * &a);
**** ** ** *** ****
* *** * ************** * * <= 'Z')
* ****** * ** * ***
**** ** * * * * * * * * * *** * * * ** * * ** == 'A'|| a == 'E' || a=='I' || a=='O'|| a=='U')
* ** * ** * ** * ** ** * * * *** * **** * * * * * * ** * * **** * * * *** *
**** * ** * * ** ** ** *** *** *
*** **** ** * ** * ** * * * *** * * * ***** * * *** ** * *** * ** * ** ** a);
*** ** * ***** * ** ***** * * **** ** *
** *** * * * ** ** ** * *

** ** **** *** *** 0;
}
100/100 answered by (220 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>
int main(){
int i;
* * ** ** * * ** ***** ** a;
** * * * **** ** * ** * * * * your input:");
    * * * * * * ** * * *** *
    if(a=='A'){
** * * * * * * * ** * **** * ***** **** ***** * ********* * * **
* * * **** *** * *** * ********* ** * * * * ** * * ** *** * ** *** * * * *** * ||i==69 || i==73 ||i==85){
****** ***** * ** ** * * * ** *** ** ** **** * * * ** * ** ** ** ** **** ** * * ** * ** ***** * * * *
* ****** *** ** ** * * *** * * *** ** ** * * ** ** * * * **
* ** ** ** * * ***** **** * ** * ** * *** * **** ** ** * **** **
* * * *** * * * ** *** ** * ** ** * * *** * * *** * * * * ** *** *** * * ***** **** ** * * * * *** * * * ** **
** ** * * ** ****** ** * * * * * * * *** * * ** ** * * * * ** *****
* * * * * ** ** * *** * * * *** ** ** * * * * *
    }
    return 0;
}
100/100 answered by (243 points)
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
'O' should be included
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
* ** ** i;
* **** * a;
**** * *** ** * your input: ");
* * * * *** ***** * ** ***** * * fflush(stdin);
* **** ** ***
*** * ** *** ** * * **
* * ** * *** * || i==69 || i==73 || i==79 || i==85){
***** * *** ** * *** * * ** * ** * * * ** ******* *** * * * * *
***** ** * ** *** * * ** * ** * * * ** * * *** * * ** ** *
* * ** * *** * * * ** ** * * ** * ** ** * * ****** * ** ***
** * ***** ** * * * *** * * * ** ** ** * * *** ** * * * ** ****** ** ***** * i);
* ** * ** ** ** ** * ** ******* * * * * * ****** ******* * ** * *** **** *** * * *** ****
}
}
 
******* * * * * * * * * *** ** * ** *** * ********** * * ** * * * * ** **** **
**** * * * * 0;
}


INPUT
Enter your input:A

OUTPUT
* ** * ***
100/100 answered by (269 points)
0 0
prog.c:26:1: error: unknown type name 'INPUT'
 INPUT
 ^~~~~
prog.c:27:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'your'
 Enter your input:A
       ^~~~
prog.c:27:7: error: unknown type name 'your'
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {

*** * * * * * **** * * a;
* ** *** ** *****
* * ** *** * * ** * * ** ** * ***** * &a);
* * * * *** * *
* ** * * * * * * <= 'Z')
** * *** * ****** ***
**** ** ** * * *** ** ** * *** *** * * *** * **** **** *** == 'A'|| a == 'E' || a=='I' || a=='O'|| a=='U')
** * **** * * ****** * ******** **** * **** * ** * *** *** ** ** ** * *** ** * * **
* * * * ** * ** * **** * * ****** * *****
** * ** ** ** * * **** * ** * *** * ****** * * ** ** ** ** ** ** * **** * ** **** * * ** a);
* **** ** * * ** ** * ** ** ** * ** * * *** *
** ** * * ** ** ** *

* **** * * * ** * 0;
}
100/100 answered by (153 points)
0 0
Case 0: Wrong output
0 0
it is not wrong output
0 0
Don't worry, every answer will be manually graded again. Yours answer is correct :)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.6.190
©2016-2025

Related questions

1 like 0 dislike
23 answers
[Exercise] Coding (C) - asked Oct 20, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 28130 - Available when: Unlimited - Due to: Unlimited
| 3.4k views
0 like 0 dislike
20 answers
[Exercise] Coding (C) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 30222 - Available when: Unlimited - Due to: Unlimited
| 2.6k views
0 like 0 dislike
17 answers
[Exercise] Coding (C) - asked Oct 27, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 29618 - Available when: Unlimited - Due to: Unlimited
| 2.4k views
0 like 0 dislike
14 answers
[Exercise] Essay (Open question) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 30244 - Available when: Unlimited - Due to: Unlimited
| 1.2k views
12,783 questions
183,443 answers
172,219 comments
4,824 users