forked from IntroCSCI/ExampleDecisions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.cpp
More file actions
38 lines (32 loc) · 636 Bytes
/
example.cpp
File metadata and controls
38 lines (32 loc) · 636 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
#include<iostream>
using namespace std;
int main()
{
int whole1, whole2, whole3;
double decimal1, decimal2;
cout<<"Enter three whole numbers: ";
cin>>whole1>>whole2>>whole3;
if( whole1 > whole2 && whole1 > whole3 )
{
cout<<"This is case A"<<endl;
}
else if( whole1 == whole2 && whole1 == whole2 )
{
cout<<"This is case B"<<endl;
}
else
{
cout<<"This is case C"<<endl;
}
decimal1 = whole1 * -1.0;
decimal2 = whole2 * whole3;
if( decimal1 > 0 || decimal2 < 0 )
{
cout<<"This is case D"<<endl;
}
if( decimal1 >= decimal2 )
{
cout<<"This is case E"<<endl;
}
return 0;
}