-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode2.cpp
More file actions
51 lines (29 loc) · 945 Bytes
/
Copy pathcode2.cpp
File metadata and controls
51 lines (29 loc) · 945 Bytes
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
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int fun1(){
int divisor, dividend, quotient, remainder;
cout << "Enter dividend: ";
cin >> dividend;
cout << "Enter divisor: ";
cin >> divisor;
quotient = dividend/ divisor;
remainder = dividend % divisor;
cout << "Quotient = " << quotient << endl;
cout << "Remainder = " << remainder << endl;
return 0;
}
int main()
{
fun1();
int first_number, second_number, sum;
cout << "Hello motherduckers, enter the first integer:";
cin >> first_number ;
cout << "Enter the second integer:";
cin >> second_number;
// sum of two numbers are stored in variable sumOfTwoNumbers
sum = first_number + second_number;
cout << first_number << "+" << second_number << "=" << sum << endl; //endl is adding a new line
return 0;
}