Thursday, July 28, 2011

Display whole 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;i++)
 {
 num+=1;
 printf("%d\t",num);
 }
getch();
}

0 comments:

Post a Comment