Answered! write a while statement that prints all even numbers between 1 and 100 to the screen….

write a while statement that prints all even numbers between 1 and 100 to the screen.

Expert Answer

 

Editable code:

#include <stdio.h>

int main()
{
int j, n=100;

printf(“1 to 100 even numbers are n”, n);

j=1;
while(j<=n)
{

if(j%2==0)
{
printf(“%dn”, j);
}

j++;
}

return 0;
}

Still stressed from student homework?
Get quality assistance from academic writers!