Computer Science, asked by yoge2390, 1 year ago

Find out errors if any
while(ctr! = 10);{
ctr=1;
sum= sum+a;
ctr= ctr+1;
}


Anonymous: What is the program for??
Anonymous: Send all in detail. Please.

Answers

Answered by Anonymous
3
Yes...there will not be semi colon ';' after while statement.

yoge2390: please also write the correct code
Answered by nitesh00777
4
there no use of semi colon after while loop
.
ctr=1; must be out side the loop
.
sum must be declared 0 out side the loop

Lazarus: braces are also not given correctly look the above question carefully
nitesh00777: braces placed correctly ..
Lazarus: the variable ctr is not initialised
nitesh00777: check answer i gave
nitesh00777: i told thefe
Similar questions