Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- //#include<stdio.h>
- #include<fstream.h>
- #include<stdlib.h>
- #include<conio.h>
- void main()
- {
- int a, b, c, sum;
- clrscr();
- //printf("Enter 2 integers to add:""\n");
- cout<<"Enter 2 integers to add:""\n";
- cin>>a>>b;
- //Summation calculation starts.
- c=a+b;
- cout<<"The sum of "<<a<<" and "<<b<<" is "<<c<<"."<<endl;
- b=c-a;
- cout<<"Subtraction from "<<c<<" to "<<a<<" is "<<b<<endl;
- a=c-b;
- //End of summation calc...
- cout<<"The sum of "<<a<<" and "<<c<<" is "<<b<<"."<<endl;
- cout<<"The sum of "<<b<<" and "<<c<<" is "<<a<<"."<<endl;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment