0 like 0 dislike
2.9k views
整數的運算會因為整數所佔的記憶體大小而有限制,無法計算太大以及太小的數字,但是如果利用字元以及陣列的結合,就可以大大的提升整數運算的範圍,請設計一個程式,讓使用者輸入兩個很大的整數,程式會把兩個整數相加後輸出。

輸入說明:輸入會包含兩個正整數,兩個正整數之間會用一個空白隔開,兩個正整數相加的結果不會超過五十位數。'

輸出說明:請將兩數相加的結果輸出。

輸入範例:

999999999999999999999999999999 999999999999999999999999999999

輸出範例:

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

reshown by | 2.9k views

16 Answers

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





int main()
* ** a, b, c;
** *** ** *** * ** * ******* **
****** * = a + b;


* * *** **** **** c);


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



return 0;
*
answered by (-98 points)
0 like 0 dislike
Hidden content!
** ***** *** * *


**** * ** ***


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


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




** ( * * )

{


** **
** = * * * * *
** ** * * ** * * * * ** *




= ** * +




* ** ** * * **










* * 0;

}
answered by (-276 points)
0 like 0 dislike
Hidden content!
* ** * * ** ** *

#include * * * *

int main (void)

{
* ** * * c;
****** a,b;
* *** * *** ********** ****
*** * ***** * * *** *** ***
* ** *
* * ** * * **** *
* *** ***** 0;

}
answered by (42 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>
*** * ** ***** *

void rect(int ,int,int *);

int main(void)

{
* ** * * * ** * a,b;
* ** *** ** *** sum;


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


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


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

}
* *** * *** rect(int x,int y,int*p1)
* * * * ** * *
** **** *** ** *** ** ** **** * *


* ** ** *** ** *
answered by (-114 points)
0 like 0 dislike
Hidden content!
** ** * ******
* ** * ** ** *



int main()



{
** * * ** * *** ***
* * **** * ** ** *** ****** * **
* **** = num[i] + num[j] ;
** ****** * ** ** * ***
***** * 0;



}
answered by (-50 points)
0 like 0 dislike
Hidden content!
#include **** * *** *****



int main (void)

{
* **** * *** ******* ** ** num1,num2,sum;
** **** ** * * * ** *** **** ***** ** * * * ****
* * * **** *** *** * * * = num1 + num2;


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

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

Related questions

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
| 9.5k 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
| 5.5k 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
| 7.6k views
0 like 0 dislike
21 answers
[Exercise] Coding (C) - asked Dec 1, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 18066 - Available when: 2016-12-01 18:30:00 - Due to: 2016-12-01 21:00:00
| 3.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