-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.cpp
More file actions
62 lines (49 loc) · 1.34 KB
/
Copy pathmain.cpp
File metadata and controls
62 lines (49 loc) · 1.34 KB
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
55
56
57
58
59
60
61
62
#include<iostream>
#include <cmath>
using namespace std;
int ModuloTwo(int a, int b){
return a%b;
}
int MultTwo(int a, int b){
return a*b;
}
int AddTwo(int a, int b){
return a+b;
}
int SubTwo(int a, int b){
return a-b;
}
void PrintLol(){
cout << endl << "LOL" << endl;
}
void PrintHeader(){
cout << "----GIT TESTING DUMMY APPLICATION V 0.02---\n\n";
}
void GetAndPrintName(){
string name;
cout << endl << "Enter your name: ";
cin >> name;
cout << endl << "It's good to meet you " << name << endl;
}
int main(){
PrintHeader();
GetAndPrintName();
//Getting input values of two numbers
int num[2];
cout << endl << "Enter one number: ";
cin >> num[0];
cout << endl << "Enter second number: ";
cin >> num[1];
//69 Check
if(num[0]==69 || num[1] == 69){
cout << endl << "ohh!, 69 is a nice choice " << endl;
}
//Printing operations of those numbers
cout << "\nThe sum is: " << AddTwo(num[0], num[1]);
cout << "\nThe difference is: " << SubTwo(num[0], num[1]);
cout << "\nThe product is: " << MultTwo(num[0], num[1]);
cout << "\nThe mod is: " << ModuloTwo(num[0], num[1]);
cout << "\nThe square root of the numbers are:" << "\n1st number : " << sqrt(num[0]) << "\n2nd number : " << sqrt(num[1]) << endl;
PrintLol();
return 0;
}