Rewrite the following while loop as for statement:
int counter = 0, sum = 0;
while(counter < 10)
{
sum += counter;
counters++;
}
Answers
Answered by
8
int sum=0;
for(int counter=0; counter<10; counter++)
{
sum +=counter;
}
.
.
.
.
PLEASE MARK ME AS BRAINLIEST AND FOLLOW ME TOO.
Answered by
1
Answer:
int sum=0;
for(int counter=0; counter<10; counter++)
{
sum +=counter;
}
Similar questions
Hindi,
9 months ago