forked from seyfarth/ebe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathavg.cpp
More file actions
69 lines (60 loc) · 1.04 KB
/
Copy pathavg.cpp
File metadata and controls
69 lines (60 loc) · 1.04 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
58
59
60
61
62
63
64
65
66
67
68
69
#include <iostream>
using namespace std;
long hello = 7000;
int mat[3][3] = {
{1, 2, 3},
{6, 7, 8},
{9, 10, 11}
};
// dfdfds sdfsdfdsfsdgdgdgf
/*sdfsfdsfsdf dfsdfsdf
dsfgfdf */
char wow[] = "stuff";
double v[100] = { 1.5, 2.5, 3.5 };
bool boo = true;
float abc;
class extra
{
public:
int x;
int y;
};
class stuff
{
public:
int add();
int a;
double b;
unsigned char c;
extra two;
};
int main ( int argc, char *argv[] )
{
double a, b, c;
double avg;
int x[7];
int i;
char s[] = "hello";
char ch = 'd';
stuff my;
stuff *p;
string name="Ray";
cout << "ready for action" << endl;
my.a = 1;
my.b = 2;
my.c = 'g';
my.two.x = 1000;
my.two.y = 2000;
p = &my;
p->a = 3;
i = 0;
while ( cin >> a >> b >> c ) {
cout << "a " << a << " b " << b << " c " << c << endl;
avg = (a+b+c)/3.0;
cout << "avg " << avg << endl;
x[i%7] = avg + hello;
i++;
}
cout << x[0] << s << my.c << ch << endl;
return 0;
}