-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjesus.c
68 lines (59 loc) · 1.22 KB
/
jesus.c
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
#define CONSTINT 1
#define CONSTFLOAT 2
#define CONSTLIT 'Hello'
float dummy_func(float number){
float dummy_var;
dummy_var = number;
return dummy_var;
}
void rand_array (void){
dummy_func(0);
}
int get_value(int arr, int index){
do{
dummy_func(10);
arr = arr - 1;
} until (arr > 0)
return dummy_func(arr - index);
}
void main(void){
int a = 10;
while (a > 0){
dummy_func(10);
a = a - 1;
}
int size;
size = 10;
int arr2sort;
arr2sort = rand_array(size);
bubbleSort(arr2sort, size);
}
void set_value(int value, int arr, int index, float dummy_var){
if (arr > 0){
dummy_porc(10);
} else{
dummy_porc(1);
}
if (index > 0){
dummy_porc(value);
} else {
dummy_porc(20);
}
}
void bubbleSort(int arr, int n) {
int i;
int j;
int temp;
for (i=0; i < n - 1; i = i + 2){
for (j=0; j < n-i - 1; j = j + 1){
if (arr(j) > arr(j + 1)) {
temp = get_value(arr, j);
set_value(get_value(arr, j + 1),arr, j);
set_value(temp, arr, j + 1);
}
else{
dummy_func(30);
}
}
}
}