forked from lahiri-phdworks/LLVM-Examples
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample1.cpp
More file actions
45 lines (41 loc) · 1.01 KB
/
example1.cpp
File metadata and controls
45 lines (41 loc) · 1.01 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
#include <iostream>
#include <stdio.h>
#include <time.h>
int retval() { return rand() % 5; }
int main() {
int a = 0, b = 0, c = 0, d = 0, z = 0, p = 0, m = 0, n = 0,
arr[5] = {0, 0, 0, 0, 0};
srand(time(NULL));
for (int i = 0; i < rand() % 500; i++) {
if (i % 5 == 0) {
for (int j = 0; j < 1000; j++) {
if (rand() % 100 == 10) {
a = b + 1;
std::cout << a << c << d << std::endl;
} else {
d = c - a;
z = b;
a = p - 50;
std::cout << d << z << a << std::endl;
if (c < d) {
c = c - 1;
a = a + 1;
std::cout << c << d << a << std::endl;
a = retval();
a = m - n;
}
for (int k = 90; i > 0; i--) {
a = a + 1;
std::cout << a << std::endl;
}
}
a = retval();
std::cout << j << a << b << c << d << std::endl;
}
}
}
c = a;
d = b;
std::cout << d << c << std::endl;
return 0;
}