Thursday, July 28, 2011

Even numbers upto a given number

#include<stdio.h>
void main()

{
int i,num=0,n;
clrscr();
printf("Enter the limit : upto ");
scanf("%d",&n);
for(i=0;i<(n/2);i++)
 {
 num+=2;
 printf("%d\t",num);
 }
getch();
}

0 comments:

Post a Comment