Consider the following program fragment:
for(c=1, sum=0; c <= 10; c++) { scanf("%d", &x); if( x < 0 ) continue; sum += x; }
What would be the value of sum for the input 1, -1, 2, -2, 3, -3, 4, -4, 5, -5
A.-5
B.30
C.10
D.1
Answers
Answered by
0
Your search - Consider the following program fragment: for(c=1, sum=0; c <= 10; c++) { scanf("%d", &x ... - did not match any documents.
Suggestions:
Make sure that all words are spelled correctly.Try different keywords.Try more general keywords.Try fewer keywords.
Suggestions:
Make sure that all words are spelled correctly.Try different keywords.Try more general keywords.Try fewer keywords.
Answered by
0
the correct answer is option no. c
Similar questions
English,
6 months ago
English,
6 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
India Languages,
1 year ago