A number n is taken from the user and then numbers from 1 to n is displayed.
Select To use this code as it is.. select and copy paste this code into code.cpp file :)
- #include<iostream.h>
- #include<conio.h>
- void main()
- {
- clrscr();
- int lim;
- cout<<"Please enter Limit: ";
- cin>>lim;
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- for(int i=1;i<=lim;i++)
- { cout<<i;
- cout<<"\n";
- }
- getch();
- }
0 comments:
Post a Comment