A simple program program that I wrote using C++ to ask the user to give two numbers and then the program will compute the sum and difference of the two given numbers by the user.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.
Program Listing
// sum_difference.cpp
// Jake Rodriguez Pomperada, MAED-IT, MIT
// www.jakerpomperada.blogspot.com / www.jakerpomperada.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines
#include <iostream>
using namespace std;
int main()
{
int a=0,b=0,sum=0,difference=0;
cout <<"\n";
cout <<"\tSum and Difference of Two Numbers in C++";
cout <<"\n\n";
cout <<"\tGive First Value : ";
cin >> a;
cout <<"\tGive Second Value : ";
cin >> b;
sum = (a+b);
difference = (a-b);
cout <<"\n\n";
cout << "\tThe sum of " << a << " and " << b <<
" is " << sum <<"."<<"\n";
cout << "\tThe difference between " << a << " and " << b <<
" is " << difference <<"."<<"\n";
cout <<"\n\n";
cout <<"\tEnd of Program";
cout <<"\n";
}
No comments:
Post a Comment