6 喜歡 0 不喜歡
1.1k 瀏覽

Write a program that input two-digit number, then prints the number with its digits reversed.

Example input: 

54

Example output:

45

 

[正常] Coding (C) - 最新提問 分類:Introduction to Computer Programming I (C) | 用戶: (12.1k 分)
ID: 27167 - 從幾時開始: 無限制 - 到幾時結束: 無限制

標籤修改 用戶: | 1.1k 瀏覽

3 個回答

0 喜歡 0 不喜歡
內容已隱藏
#include ****** * * * * *

int main()
{
* * * * ** * *** * ** * * num, temp, remainder, reverse = 0;
*** * ****** * * *
** *** ** * * * *** * ** * * * ** ** &num);
** * ** *** **** * ** *** = num;
** ** * * **** ** * (num > 0)
* ****** *** *** * ****
* *** ** ** **** * ** * ** * * * ** * = num % 10;
*** * ** * * ** ** ** * * ** * = reverse * 10 + remainder;
*** ** * * * * ** *** * ** ** * * * ** /= 10;
* *** * * *** *** **
** * * * * ** **** ** *** * ** * reverse);


*** ** * * ** *** ****** 0;
}
最新回答 用戶: (323 分)
0 0
prog.c: In function 'main':
prog.c:5:14: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
     int num, temp, remainder, reverse = 0;
              ^~~~
cc1: all warnings being treated as errors
0 喜歡 0 不喜歡
內容已隱藏
#include *** * ******* *

int main()
{
** * ***** *** *** num, temp, remainder, reverse = 0;
* * *** *** ** ****
*** * * * * ** ** ** * * * **** ****** * ****** * ** * &num);
* ****** ** **** * * = num;
* * * ** *** **** * (num > 0)
* *** ****** * *** * ******
** ** * *** * * *** * ** * ** ** **** = num % 10;
* * * * * ** * * ** * * * ** * * = reverse * 10 + remainder;
**** * ** ** **** ** * ** * * * * * ** ** ** /= 10;
** ****** *
* * ** **** * * * * * **** *** reverse);
}
最新回答 用戶: (323 分)
0 0
prog.c: In function 'main':
prog.c:5:14: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
     int num, temp, remainder, reverse = 0;
              ^~~~
cc1: all warnings being treated as errors
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
int main()
{
    int a,b,c;
** * **** ****** *** ** *** ********* ** * ** * ****
* **** * * * * * ** ******* ** ** *
* * * * ** ***** ** ** ** *
*********** * ** ** ***
* * ****** * * *
* ** ** **** * ** **** **** ** * * *
*** * * * ** * * * * *** * ** * * ** *
* ** * * * * * * ** ***** 0;
}
最新回答 用戶: (-254 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.130.70
©2016-2025

相關問題

6 喜歡 0 不喜歡
1 回答
[正常] Coding (C) - 最新提問 10月 16, 2017 分類:Introduction to Computer Programming I (C) | 用戶: thopd (12.1k 分)
ID: 27170 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 822 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶