This is an ideal first program for learning "cin"
Two numbers are taken from the user and then displayed as output.
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 a,b;
- cout<<"enter first no. ";
- cin>>a;
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- cout<<"enter second no. ";
- cin>>b;
- cout<<"First no. is "<<a;
- cout<<"\nSecond no.is "<<b;
- getch();
- }
0 comments:
Post a Comment