-
Notifications
You must be signed in to change notification settings - Fork 0
/
act 3.cpp
45 lines (37 loc) · 1.31 KB
/
act 3.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
/*****************************************
ACTiViTY #3 (p. 69)
Design a program that will accept two numbers.
If the first number is larger than second number perform Subtraction,
if the first numberis less than the second number perform Addition
if the first number is the same as the second number perform Division
******************************************/
#include <iostream>
using namespace std;
int main()
{
int FN, SN;
int FN1, SN1;
int yn;
//-------------- INSTRUCTION ---------------//
cout << "INSTRUCTION:\n\n ";
cout << "This program Design that will accept two numbers.\n";
cout << "If the first number is larger than second number,it will perform Subtraction\n";
cout << "If the first numberis less than the second number,it will perform Addition\n";
cout << "If the first number is the same as the second number,it will perform Division\n";
//------------------- INPUTING -----------------------//
cout << "\nENTER TWO NUMBER \n";
cout << "\nFirst number is: ";
cin >> FN;
cout << "Second number is: ";
cin >> SN;
//-------------- Conditional process ---------------//
if (FN > SN)
cout << "First Number - Second Number = " << FN - SN;
{
if (FN < SN)
cout << "First Number + Second Number = " << FN + SN;
if (FN == SN)
cout << "First Number / Second Number = " << FN / SN;
}
return 0;
}