-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_math2.cpp
38 lines (36 loc) · 1.33 KB
/
2_math2.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
/* Some math addition operation
written by Tariq Ridwan: 👉 https://tariqridwan.github.io/
Universitat Politècnica de Catalunya, Barcelona */
#include<iostream>
#include<string>
using namespace std;
int main()
{
double a,b;
float c;
string write_something,again_write,man_write_again;
write_something = "Adding some string statement before the mathematical operations\n Included string library for that\n";
again_write = "by the way do you know why loko is always angry¿¿\n";
man_write_again = "Yes coz he is a loko\n";
cout << write_something;
cout << again_write;
cout << man_write_again;
cout << "Trying to revise the basic code again\n";
cout << "Writing a new line to show another way of new line" << endl;
cout << "Now let's do some Math.......\n";
cout << "Let us add two different numbers called a & b.\n";
cout << "What is the first number?\n";
cin >> a;
cout << "Now by saying bismillah, insert the 2nd number man" << endl;
cin >> b;
cout << "Now the last number: \n";
cin >> c;
cout << "So the summation is: \n";
cout << a+b+c << endl;
cout << "See the output of 5/10 in C++:\n";
cout << 5/10 << endl;
cout << "Now see the output of 5.0/10 in C++:\n";
cout << 5.0/10 << endl;
cout << "Do you see any differences? :)\n";
return 0;
}