Write a for loop that does exactly the same thing as the fol

Write a for loop that does exactly the same thing as the following code: i = 1; while (i

Solution

sol:the extract for loop for that will same a while loop is

int i;
for(i=1;i<11;i+=2)
{
cout<<\"the sqaure root of \"<<i<<\"is\"<<sqrt(i);
}

the above for loop functionality will be same as while loop

 Write a for loop that does exactly the same thing as the following code: i = 1; while (i Solutionsol:the extract for loop for that will same a while loop is in

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site