Monday, October 21, 2019

Program to print n EVEN numbers


#include<stdio.h>
main()
{
int i,n;
printf("enter value n=   ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("%d",2*i);
}
getch();
}


Output
n=10

2,4,6,8,10,12,14,16,18,20.

No comments:

Post a Comment