forked from eupdate/cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdpqr.cpp
54 lines (37 loc) · 1 KB
/
sdpqr.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
*Project:05;
*Author:Samitha Hewawasam;
*Date:2015-05-20;
*Tool:atom text editor;
*Compiler:g++;
*OS:ubuntu 14.04;
*Extra Tools: astyle prity print
*/
#include <iostream>
void main() {
/*
We get integer varibles as n1, n2, sum, difference, product, quotient
*/
int n1, n2, sum, difference, product, quotient;
//So now we need to ask from user to enter numbers respectively
cout<<"Enter first number ?";
cin>>n1;
cout<<"Enter second number ?";
cin>>n2;
// Find the sum
sum=n1+n2;
// Now print output to the user
cout<<"The SUM is : "<<sum<<endl;
// Find the difference
difference=n1-n2;
// Now print output to the user
cout<<"The DIFFERENCE is : "<<difference<<endl;
// Find the difference
product=n1*n2;
// Now print output to the user
cout<<"The PRODUCT is : "<<product<<endl;
// Find the difference
quotient=n1/n2;
// Now print output to the user
cout<<"The QUOTIENT is : "<<quotient<<endl;
}