-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
53 lines (49 loc) · 1.08 KB
/
main.cpp
File metadata and controls
53 lines (49 loc) · 1.08 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
#include <iostream>
#include "Box.h"
void checkBox()
{
int n;
std::cin >> n;
Box temp;
for (auto i = 0; i < n; ++i)
{
int type;
std::cin >> type;
if (type == 1)
std::cout << temp << std::endl;
if (type == 2)
{
int l, b, h;
std::cin >> l >> b >> h;
Box NewBox(l, b, h);
temp = NewBox;
std::cout << temp << std::endl;
}
if (type == 3)
{
int l, b, h;
std::cin >> l >> b >> h;
Box NewBox(l, b, h);
if (NewBox < temp)
std::cout << "Lesser\n";
else
std::cout << "Greater\n";
}
if (type == 4)
std::cout << temp.CalculateVolume() << std::endl;
if (type == 5)
{
auto NewBox(temp);
std::cout << NewBox << std::endl;
}
}
}
int main()
{
//Box box{ 3, 4, 5 };
int answer;
//std::cout << box << std::endl;
//box << std::cout;
checkBox();
std::cin >> answer;
}