c program to print first 10 even numbers using for loop

Solutions on MaxInterview for c program to print first 10 even numbers using for loop by the best coders in the world

showing results for - "c program to print first 10 even numbers using for loop"
Alina
17 Oct 2018
1#include <stdio.h>
2
3int main() {
4	int i;
5	printf("Even numbers between 1 to 50 (inclusive):\n");
6	for (i = 1; i <= 50; i++) 
7	{
8		if(i%2 == 0) 
9		{
10		  printf("%d ", i);
11		}
12	}
13	return 0;
14}
15