Computer Science, asked by tiwarishashwat43, 7 months ago

Rewrite the following while loop as for statement:
int counter = 0, sum = 0;
while(counter < 10)
{
sum += counter;
counters++;
}

Answers

Answered by ArpitMishra506
8

int sum=0;

for(int counter=0; counter<10; counter++)

{

sum +=counter;

}

.

.

.

.

PLEASE MARK ME AS BRAINLIEST AND FOLLOW ME TOO.

Answered by tiwarishashwat125
1

Answer:

int sum=0;

for(int counter=0; counter<10; counter++)

{

sum +=counter;

}

Similar questions