Rewrite Following Code Using Loop Instead Loop Variable Integer Provide First Line Loop As Q37272554

Rewrite the following code using a for loop instead of a whileloop. The variable i is an integer. Only provide the first line ofthe for loop. I am assuming the body of the for loop will onlycontain the print statement.

int i =1;

while (i <= 10) {
printf(“%dn”, i);
i++;
}


Answer


for (int i = 1; i <= 10; i++) color{blue}Please;let;me;know;if;you;have;any;doubts Please;upvote;this;answer.;;Thanks!!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.