MyComputerWorld
Labels
C PROGRAMS (Arrays Pointers and Structures)
(32)
Computer Tips and Tricks
(26)
Did You Know?
(18)
Downloads
(4)
Various Programs in C
(18)
Sunday, 3 March 2013
Program to print 1 to 100 without using loop
#include<stdio.h>
int main()
{
int num = 1;
print(num);
getch();
return 0;
}
int print(num)
{
if(num<=100){
printf("%d ",num);
print(num+1);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment