Print even numbers Upto n

#include<stdio.h>
#include<conio.h>
int main()
{
int i=2,n;
clrscr();
printf("Enter end term ");
scanf("%d",&n);
while(i<=n)
{
printf("%d\t",i);
i=i+2;
}
getch();
return 0;
}

0 comments:

Post a Comment