Write a program to printout even numbers from 1-1000
#include <stdio.h>
int main()
{
for (int i=1; i <= 1000; i++)
{
if (i % 2 == 0)
printf("%d ", i);
if (i % 25 == 0)
printf("\n");
}
return 0;
}
Comments
Leave a comment