WSQ 01

Here you have it… WSQ 01. The program is very simple: You give the computer 2 numbers and the computer do different operations with them. In this program, there is no need to add additional libraries, you just use <iostream>. So here’s the code and how it works. If you have any questions, you can contact me in the twitter link on top of my blog.


#include <iostream>

using namespace std;

int main()
int n1, n2, sum, dif, pro, divi, rema;
cout<<“Give me two numbers and I’ll calculate its sum, difference, product, division and remainder from division.”<<endl;

cout<<“Give me your first number:”<<endl;
cout<<“Give me your second number:”<<endl;
cout<<“The result of the sum is “<<sum<<“.”<<endl;

cout<<“The result of the difference is “<<dif<<“.”<<endl;

cout<<“The result of the product is “<<pro<<“.”<<endl;

cout<<“The result of the division is “<<divi<<“.”<<endl;

cout<<“The remainder of the division is “<<rema<<“.”<<endl;
return 0;



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s