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

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

 

輸入範例:

10 16

輸出範例:

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

reshown by | 4.7k views

21 Answers

0 like 0 dislike
Hidden content!
* **** * * * * *
** * ***** ** *

int main( )

{

int a,b;
* * * * ** * * * *

if(a==0&&b==2)
******* *** *** *

if(a==1&&b==2)
**** * ** ** * *

if(a==2&&b==2)
* * * *** * **

if(a==3&&b==2)
** *** * **** * ** *

if(a==0&&b==8)
*** ***** * ** **** ** * ** * *
* ** * *** ***
** ** ***** *** *
**** * * * *
* ** ** * * * *
***** * * *** * * *
** ** * * ** ***
**** *** * *
** *** * * * * ** *
* * * ** ** * ***
* * * ** **** *
* * ****** * * ** **
** * * ** *** ***
** ** * * * ** * **
* ** * **** * ** * *
* * ***** * * *

if(a==1&&b==8)
** * * * **** *

if(a==2&&b==8)
* * * ****

if(a==3&&b==8)
* **** * ** * * **

if(a==4&&b==8)
** ** * * ** *

if(a==5&&b==8)
* *** * * * *** * *

if(a==6&&b==8)
** * * *** * ** ** *

if(a==7&&b==8)
* * ** * ** * ***
*** ** ** * ****
* **** * ** * * * * **
** * * *** * ****
* ** ** ** * ** * *
* ** * *** * *
*** *** ** * * *
* * * *** *
* ** ** * ***
* * **** * *
* * *** * * ****
** * * * ** * ***
* ** ** *** * *
* * * ** ** *
** **** * * ** * ** *
** ** *** * * *** **
* * ***** * ** **
* *** * **
* * ** **** *
** *** *** *** ****
** * ** * ** **
*** * * * ** **** *
*** *** * *** **
* *** ** ****** *
* *** *** * * *
*** * ******* * * ***
*** ** * * * * * * * *
* *** ** *** * **
**** * * ** ** *
****** **
*** * *** * * *
* * **
** ** * ***** * *





return 0;





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

Related questions

0 like 0 dislike
16 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 18075 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 4.1k views
0 like 0 dislike
86 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 18071 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 13.7k views
0 like 0 dislike
49 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 18070 - Available when: Unlimited - Due to: Unlimited
| 7.7k views
0 like 0 dislike
62 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 18067 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 11.3k views
0 like 0 dislike
0 answers
[Resource] asked Dec 1, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 18085 - Available when: Unlimited - Due to: Unlimited
| 10 views
12,783 questions
183,442 answers
172,219 comments
4,824 users