Two numbers are taken from the user and sum is calculated.
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();
- float a,b,s;
- cout<<"Please enter a no.: ";
- cin>>a;
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- cout<<"Please enter another no.: ";
- cin>>b;
- s=a+b;
- cout<<"The sum is: "<<s;
- getch();
- }
1 comments:
Post a Comment