Browse Source

Suppression .o

Paul Faure 2 months ago
parent
commit
c2a70038ea
2 changed files with 39 additions and 10 deletions
  1. 39
    10
      Fichiers_Tests/progC
  2. BIN
      Tables/Fonctions/tab_fonctions.o

+ 39
- 10
Fichiers_Tests/progC View File

@@ -1,15 +1,44 @@
1
-int g(int o){
2
-	int j = o * 2;
3
-	return j;
1
+int get_value() {
2
+	int i = 0;
3
+	while (i<5) {
4
+		printf(0);
5
+		stop(1);
6
+		printf(255);
7
+		stop(1);
8
+		i = i+1;
9
+	}
10
+	stop(15);
11
+	i = get();
12
+	return i;
4 13
 }
5 14
 
6
-
7
-int f(int p){
8
-	int y = p + 2;
9
-	return y - 5 + g(1);
15
+int max(int * tab, int size) {
16
+	int i = 0;
17
+	int max = 0;
18
+	while (i<size) {
19
+		if (tab[i] > max) {
20
+			max = tab[i];
21
+		}
22
+		i = i+1;
23
+	}
24
+	return max;
10 25
 }
11 26
 
12
-int main(){
13
-	int a = 7;
14
-	int c = f(a);
27
+int main() {
28
+	int tab[10];
29
+	int i = 0;
30
+	while (i<10) {
31
+		tab[i] = get_value();
32
+		i = i+1;
33
+	}
34
+	i = 0;
35
+	while (i<5) {
36
+		printf(170);
37
+		stop(1);
38
+		printf(85);
39
+		stop(1);
40
+		i = i+1;
41
+	}
42
+	stop(3);
43
+	printf(max(tab, 10));
15 44
 }

BIN
Tables/Fonctions/tab_fonctions.o View File


Loading…
Cancel
Save