-
Notifications
You must be signed in to change notification settings - Fork 0
/
practice.cpp
56 lines (47 loc) · 969 Bytes
/
practice.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
#include "iostream"
#include "stdlib.h"
#include "cmath"
using namespace std;
void fizzbuzz() {
for (int i = 1; i < 100; i++) {
if((i % 15) == 0) {
cout << "fizzbuzz\n";
} else if ((i % 3) == 0) {
cout << "buzz\n";
} else if ((i % 5) == 0) {
cout << "fizz\n";
} else {
cout << i << "\n";
}
}
}
int main () {
int coolness = sqrt(93);
bool student = true;
bool epic = true;
struct Student {
string name;
int age;
};
struct Student s1;
cout << "this is coding for the Internet of Things\n";
cout << "what is your name? ";
cin >> s1.name;
system("clear");
cout << "hello, " << s1.name << "\n";
cout << "what is your age?\n";
cin >> s1.age;
system("clear");
cout << s1.name << " is " << s1.age << "\n";
fizzbuzz();
if (student == true) {
coolness++;
}
if (epic == true) {
for (int i = 0; i < 50; i++) {
coolness++;
cout << "coolness: " << coolness << " ";
}
}
return 0;
}