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
Political Science,
3 months ago
Hindi,
3 months ago
Hindi,
7 months ago
English,
11 months ago
India Languages,
11 months ago