0 like 0 dislike
654 views
請設計一個程式,由使用者輸入一個十進位的數後再輸入想要轉換成的進位制,程式會將他轉換後輸出。

輸入說明:輸入的第一個數是一個十進位的數,接著會輸入一個正整數N代表要轉換的進位制。兩個數之間會用一個空白格開。

 

輸入範例:

10 16

輸出範例:

A
[Exercise] Coding (C) - asked in 2016-1 程式設計(一)AD by (18k points)
ID: 18065 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00

reshown by | 654 views

11 Answers

0 like 0 dislike
Hidden content!
#include <stdio.h>

#include ** * * **



int main(int argc, char *argv[]){
* * **** ***** **** ** ****** n,a,i,k=0;
* * * * *** * *** c[16] = ** ** ** * * * *** ** * * * ** **
** * ** *** * ** * *** * *** o[100];
* **** ****** **** * * *
*** * ** **** * ****** ** ** ** * * * ******
* * * **** *
* * * ** * * ** *** *** *** != 0){
* * ** ***** ******* **** * * ** * ** = n % a;
**** * * *** * ** ****** * **** * = c[i];
*** *** * **** ** * * * * ** * printf("%c ** *** * *
* *** * ****** * ** ** * * **** ** = n / a;
* * ** **** ***** * **
* *** ** ** ** * * *
** * * ** ** *** ** * ** >= 0){
* **** * **** * * * *** ** ** * * ** ** ** * ***** *** **** *** ** * *
* **** ** * ** **** *

  

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

}
answered by (-216 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:108.162.216.16
©2016-2024

Related questions

0 like 0 dislike
5 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 18074 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 424 views
0 like 0 dislike
96 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 18072 - Available when: Unlimited - Due to: Unlimited
| 3.4k views
0 like 0 dislike
13 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 18069 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 741 views
0 like 0 dislike
67 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 18068 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 2.6k views
0 like 0 dislike
0 answers
[Resource] asked Dec 1, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 18084 - Available when: Unlimited - Due to: Unlimited
| 7 views
12,783 questions
183,443 answers
172,219 comments
4,824 users