-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomwwork 6 CIS TEAM (Part 4).cpp
64 lines (47 loc) · 1.4 KB
/
Homwwork 6 CIS TEAM (Part 4).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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Homwwork 6 CIS TEAM (Part 4).cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
using namespace std;
int main()
{
int x, num1, num2, num3, num4, num5;
int sum = 0;
cout << "Enter the random number: ";
cin >> x;
cout << " Enter the 1st number: ";
cin >> num1;
cout << " Enter the 2nd number: ";
cin >> num2;
cout << " Enter the 3rd number: ";
cin >> num3;
cout << " Enter the 4th number: ";
cin >> num4;
cout << " Enter the 5th number: ";
cin >> num5;
if (num1 <= x)
cout << "number are <= " << x << "\n";
else
cout << "number are > " << x << '\n';
if (num2<= x)
cout << "number are <= " << x << "\n";
else
cout << "number are > " << x << '\n';
if (num3 <= x)
cout << "number are <= " << x << "\n";
else
cout << "number are > " << x << '\n';
if (num4 <= x)
cout << "number are <= " << x << "\n";
else
cout << "number are > " << x << '\n';
if (num5 <= x)
cout << "number are <= " << x << "\n";
else
cout << "number are > " << x << '\n';
sum += (num1 <= x);
sum += (num2 <= x);
sum += (num3 <= x);
sum += (num4 <= x);
sum += (num5 <= x);
cout << sum << " " << 5 - sum;
}