0 like 0 dislike
1.3k views

Question 9: Please a write a program that receives a set of numbers, then outputs the summation of those inputs.

Input1

3
1 2 3

Output 1

6

 

Input2

5
-1 -1 -1 0 0

Output2

-3

 

Input3

2
-1 5

Output3

4

 

[Exam] asked in Final examination by (5.9k points)
ID: 41968 - Available when: Unlimited - Due to: Unlimited
| 1.3k views

21 Answers

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

int main(){
* ** * * *** int n,t;
* **   int x[50];
** ** *****
* ** * ** * * * * * ** * ***
*** *
** * * * * for(int *** **** *
* ****** * ** **** **** **** ** * **** ** * * *
* * ** * * * t=t+x[i];
* **** * ** }
*** ** * * **
* * ** ********* **
}
100/100 answered by (244 points)
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:172.69.7.123
©2016-2024

Related questions

0 like 0 dislike
22 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41975 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 1.3k views
0 like 0 dislike
30 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41942 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 1.6k views
0 like 0 dislike
26 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41937 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 813 views
0 like 0 dislike
21 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41935 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 592 views
0 like 0 dislike
23 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41926 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 758 views
12,783 questions
183,443 answers
172,219 comments
4,824 users