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

Don't use plagiarized sources. Get Your Custom Essay on
Answered! write a while statement that prints all even numbers between 1 and 100 to the screen….
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
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;
}