Program:
#include<iostream.h>
void main()
{
static int i;
i++;
if(i==101)
{
getch();
exit(0);
}
else
{
cout<<"\n"<<i;
main();
}
}
Output:
1
2
3
4
5
.
.
.
.
.
100
#include<iostream.h>
void main()
{
static int i;
i++;
if(i==101)
{
getch();
exit(0);
}
else
{
cout<<"\n"<<i;
main();
}
}
Output:
1
2
3
4
5
.
.
.
.
.
100
No comments:
Post a Comment