5. Identify all the compound statements which appear in the following program segment:
sum=0;
do {
scanf("%d", &i);
if (i < 0)
i=-i;
++flag;
sum += i;
while (i != 0);
harmansingh141:
what is scanf?
Answers
Answered by
0
Answer:
Compound statements or blocks are brace-enclosed sequences of statements.
Explanation:
the part of 'do' block is an example of compound statement
do{
scanf("%d", &i);
if (i < 0)
i=-i;
++flag;
sum += i;
}while(i !=0)
Similar questions