0

Correct the errors and show the output of following the program:

#include<iostream.h> void main( ) { char count = 1; int sum = 0; while ( count <= 25 ) { sum = sum + count; count = count + 2 cout << “sum is: “ << sum << endl; }

10th Apr 2021, 12:57 PM
pro.shahad *
pro.shahad * - avatar
1 Resposta
+ 1
You declared count as a character change it to 'int'
10th Apr 2021, 1:54 PM
Arun Ruban SJ
Arun Ruban SJ - avatar