print first n even numbers in c code example
Example: c program to print first 10 even numbers using for loop
#include <stdio.h>
int main() {
int i;
printf("Even numbers between 1 to 50 (inclusive):\n");
for (i = 1; i <= 50; i++)
{
if(i%2 == 0)
{
printf("%d ", i);
}
}
return 0;
}