2 喜歡 0 不喜歡
9.8k 瀏覽
請寫一個程式,輸入任意字元,程式會輸出該字元相對應的十進位ASCII碼

輸入說明:

程式每次會輸入一個字元

輸出說明:

對於輸入的字元,請輸出相對應的十進位ASCII碼

輸入範例:

0

輸出範例

48
[練習] Coding (C) - 最新提問 分類:2017-1 程式設計(一)AD | 用戶: (18k 分)
ID: 31094 - 從幾時開始: 無限制 - 到幾時結束: 無限制

修改於 用戶: | 9.8k 瀏覽

29 個回答

0 喜歡 0 不喜歡
內容已隱藏
*** **** * *** ****
int main()
{
* ****** * a;
*** ** * ***** * ** * * ***** *** **
**** * ** * ** *** ****
** * ** * * 0 ;
}
最新回答 用戶: (236 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
int main(){
** ** ******* * ** * c;
****** * * ** ** * *** *** * * ** * *** * * *
* * ** *** *** ** * ** *** * * ****** **
** * ***** ** * ** ** **** 0;
}
最新回答 用戶: (212 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
int main(){
*** * *** * ***** * ***** c;
* * * ***** * * ** ********* ** *** * *
* * * ***** ** * ** * * * * * * *** *
* **** * * **** ** ** * 0;
}
最新回答 用戶: (194 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
int main()
{
** * * * ******** ** * c;
**** ** ** * * * * * * * ** * * * *
** * ** * * * * ** ** * ** * * ** **
* ** * ****** * ** * * ** ***** ** **

* * * * ** 0 ;
}
最新回答 用戶: (194 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
* ***** *
int main()
{
* ** * *** * ** ** c;
* * ** * * * *** ** * * * ** *** * * * *** **

*** ** ** * * **** ***** * * * *** *

  
 
* *** ** * * 0 ;
}
最新回答 用戶: (194 分)
0 0
prog.c: In function 'main':
prog.c:5:11: warning: too many arguments for format [-Wformat-extra-args]
    printf("\xe7\xa8\x8b\xe5\xbc\x8f\xe6\xaf\x8f\xe6\xac\xa1\xe6\x9c\x83\xe8\xbc\xb8\xe5\x85\xa5\xe4\xb8\x80\xe5\x80\x8b\xe5\xad\x97\xe5\x85\x83",c);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 喜歡 0 不喜歡
內容已隱藏
** **** *****
int main()
{
**** * * * c;
* ** * ** * ** * * *** *** * ***** * ***** **
*** * * * *
** ********** * *** **** *****


**** ***** * * 0 ;

}
最新回答 用戶: (194 分)
0 0
prog.c: In function 'main':
prog.c:6:5: warning: implicit declaration of function 'getch' [-Wimplicit-function-declaration]
   c=getch();
     ^~~~~
/tmp/ccnbCj2o.o: In function `main':
prog.c:(.text+0x1f): undefined reference to `getch'
collect2: error: ld returned 1 exit status
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
* * * ** *
int main()
{
* **** *** * ****** c;
***** * * *** * * * * * *** ****
**** * ** ** ** *** * * ****** *
** * * *** * **** * * 0;
}
最新回答 用戶: (100 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
** * * *** * ***

int main()
{
* ** * * ** *** ** * c;
* **** ** ** **** *** ** * *** *****
* * ** * *** *
** ** * ** * ** * * **** * * *** **


}
最新回答 用戶: (174 分)
修改於 用戶:
0 0
prog.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^~~~
0 0
prog.c: In function 'main':
prog.c:6:12: warning: format '%c' expects argument of type 'char *', but argument 2 has type 'int *' [-Wformat=]
    scanf("%c",&c);
            ^
0 0
prog.c: In function 'main':
prog.c:6:12: warning: format '%c' expects argument of type 'char *', but argument 2 has type 'int *' [-Wformat=]
    scanf("%c",&c);
            ^
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
int main()
{
** *** ** ****** * ** ch;
** * * * * ** *
* * * * * * **** ** * * character:");
* * ** * ***** * * *** ** ** ***** * ** *
* * ** *** *** * * * ** *
**** * ** ** *** *** * **** **** *** * and its ASCII code is %d\n",ch,ch);
* ** * *** * *** * ***
** ** *** *** * *
** * * * * * **** ** 0 ;
** * ** ** ** ** ** * * *
* * * ** * * * ***
** * ** *** * **** *
最新回答 用戶: (194 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
*** * * * * * *
int
{
* * * char ch;
** * * ch = ** **
* * ** * **** * ** *** * * * * ;
****** * * * * 0;
* ** *
最新回答 用戶: (228 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:104.23.243.165
©2016-2026

相關問題

2 喜歡 0 不喜歡
31 回答
[練習] Coding (C) - 最新提問 11月 9, 2017 分類:2017-1 程式設計(一)AD | 用戶: Shun-Po (18k 分)
ID: 31088 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 11.1k 瀏覽
2 喜歡 0 不喜歡
23 回答
[練習] Coding (C) - 最新提問 11月 9, 2017 分類:2017-1 程式設計(一)AD | 用戶: Shun-Po (18k 分)
ID: 31085 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 7.7k 瀏覽
3 喜歡 0 不喜歡
9 回答
[練習] 對錯二選一 - 最新提問 11月 16, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 33764 - 從幾時開始: 2017-11-16 14:00 - 到幾時結束: 2017-11-16 14:30
| 1.6k 瀏覽
3 喜歡 0 不喜歡
9 回答
[練習] 對錯二選一 - 最新提問 11月 16, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 33763 - 從幾時開始: 2017-11-16 14:00 - 到幾時結束: 2017-11-16 14:30
| 1.6k 瀏覽
2 喜歡 0 不喜歡
24 回答
[練習] Coding (C) - 最新提問 11月 16, 2017 分類:2017-1 程式設計(一)AD | 用戶: Shun-Po (18k 分)
ID: 33762 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 7.6k 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶