forked from blksail-edu/cpp-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
57 lines (49 loc) · 1 KB
/
Copy pathmain.cpp
File metadata and controls
57 lines (49 loc) · 1 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
54
55
56
57
#include <iostream>
#include <vector>
#include <cmath>
#include <array>
#include "Point.hpp"
#include "line.hpp"
int add(int x, int y)
{
return x + y;
}
int subtract(int x, int y)
{
return x-y;
}
int product(int x, int y)
{
return x*y;
}
int division(int x, int y)
{
return x/y;
}
class circle
{
public:
int Radius;
int area()
{
return M_1_PI*Radius*Radius;
}
};
int main()
{
std::cout << "Hello, world!" << std::endl;
int z = 3;
int x = 5;
int y = 7;
int w = 2;
int v = 4;
std::cout << "The sum of " << x << " and " << y << "and"<< z<< " is " << x + y + z << std::endl;
std::cout << "the product of "<<z<<"and" <<x<< "and" <<w<< "and"<<y<< "is" << x*z*w*y << std::endl;
std::cout <<"The quotiont of" <<x<< "and" <<y<< "is" << x/y<< "also"<<v<< "is equal to "<<v<< std::endl;
std::cout <<"Jules Hohmann, AUV" << std::endl;
circle c;
c.Radius = 5;
int area = c.area();
std::cout <<"The area of circle is"<<area<< std::endl;
return 0;
}