0 喜歡 0 不喜歡
3.8k 瀏覽

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

 

[練習] Coding (C) - 最新提問 分類:Chapter 3: Branching, Looping and Functions | 用戶: (5.9k 分)
ID: 30241 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 3.8k 瀏覽

24 個回答

0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (221 分)
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (183 分)
0 0
Case 0: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include * ** *
#include ** **** ****

int main() {
* ** ** char a;
* ** * * ** * * ** your * **
* *** ** *** *** * * * * * **
***  
**** * * ** * ** ** ** ** **** ** ** *
** * * ** ***** * ** * ** ***** * ** ** * * ***** * ***
**   }else{
** ** * ****   * ***** * * * ** **
** *** * * *** }
** * * * *
* * * * ** return 0;
}
100/100 最新回答 用戶: (244 分)
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 喜歡 0 不喜歡
內容已隱藏
*
最新回答 用戶: (244 分)
0 1
prog.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
 gg
 ^~
0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (183 分)
0 0
prog.c: In function 'main':
prog.c:17:5: error: expected declaration or statement at end of input
     }
     ^
0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (246 分)
0 0
Case 0: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (220 分)
0 0
Case 0: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (243 分)
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
'O' should be included
0 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (269 分)
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 喜歡 0 不喜歡
內容已隱藏
#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 最新回答 用戶: (153 分)
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.70.100.189
©2016-2025

相關問題

1 喜歡 0 不喜歡
23 回答
[練習] Coding (C) - 最新提問 10月 20, 2017 分類:Chapter 3: Branching, Looping and Functions | 用戶: nat236919 (5.9k 分)
ID: 28130 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 4.4k 瀏覽
0 喜歡 0 不喜歡
20 回答
[練習] Coding (C) - 最新提問 11月 2, 2017 分類:Chapter 3: Branching, Looping and Functions | 用戶: nat236919 (5.9k 分)
ID: 30222 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 3.5k 瀏覽
0 喜歡 0 不喜歡
17 回答
[練習] Coding (C) - 最新提問 10月 27, 2017 分類:Chapter 3: Branching, Looping and Functions | 用戶: nat236919 (5.9k 分)
ID: 29618 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 3.3k 瀏覽
0 喜歡 0 不喜歡
14 回答
[練習] 開放式問答 - 最新提問 11月 2, 2017 分類:Chapter 3: Branching, Looping and Functions | 用戶: nat236919 (5.9k 分)
ID: 30244 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 1.7k 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶