Salut,
Dans le cadre de mon apprentissage du pascal j'ai décider d'entamer un programme qui utilisera beaucoup de variables mais voila, ça se compile mais il y'a pas mal de bug
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
 
program moyenne_general;
uses crt;
var
math,phy,svt,fr,phil,ar,hg,inf,eng,iss,sport:real;
coe_mps,coe_fr,coe_otre,coe_general:real;
choix:integer;
ans:char;
choix2:integer;
mo_s,mo_lt,mo_gen:real;
 
	procedure rule_vars;
	begin
 
	coe_mps:= 4;
	coe_fr:= 3;
	coe_otre:= 2;
	coe_general:= 30;
	end;
 
	procedure print_mo;
	begin
 	writeln('La moyenne scientifique est :',mo_s:02);
 	writeln('La moyenne literaire est :',mo_lt:02);
 	writeln('La moyenne  est :',mo_gen:02);
 readln;
	end;
	procedure calc_mo;
	begin
	mo_s := ((math * coe_mps) + (phy * coe_mps) + (svt * coe_mps)) / (coe_mps*3);
	mo_lt:= ((fr*coe_fr)+(phil*coe_otre)+(ar*coe_otre)+(hg*coe_otre)+(inf*coe_otre)+(eng*coe_otre)+(iss*coe_otre)+(sport*coe_otre))/((coe_fr)+(coe_otre*7));
	mo_gen:=((math * coe_mps) + (phy * coe_mps) + (svt * coe_mps) + (fr*coe_fr)+(phil*coe_otre)+(ar*coe_otre)+(hg*coe_otre)+(inf*coe_otre)+(eng*coe_otre)+(iss*coe_otre)+(sport*coe_otre))/((coe_general));
	print_mo;
	end;
 
	procedure take_marks;
	begin
	writeln('Donnez la note de :');
	writeln('math :');
	read(math);
	writeln('physique :');
	read(phy);
	writeln('S.V.T :');
	read(svt);
	writeln('Francais :');
	read(fr);	
	writeln('Philosophie :');
	read(phil);
	writeln('arabe:');
	read(ar);
	writeln('HG');
	read(hg);
	writeln('informatique :');
	read(inf);	
	writeln('englais :');
	read(eng);
	writeln('IS :');
	read(iss);
	writeln('sport:');
	read(sport);
	writeln('Chargement!!!');
	calc_mo;
	end;
 
	procedure set2_coe;
	begin
	writeln('Chargement...');
	writeln('Lequel voulez vous regler?');
	writeln('1.Matiéres scientifique?');
	writeln('2.Francais?');
	writeln('3.Matieres litéraires');
	writeln('4.Coeficient General');
	writeln('<Choisissez avec le nombre de la reponse>');
	case choix2 of
 	1 : read(coe_mps);
	2 : read(coe_fr);
	3 : read(coe_otre);
	4 : read(coe_general)
	else writeln('Choix indisponible');
	end;
	take_marks;
	end;
 
 
 
	procedure set1_coe;
	begin
	writeln('Chargement ...');
	writeln('Les coeficients sont en ce moment:');
	writeln('Math & Science & Physique :',coe_mps);
	writeln('Francais reglé sur :',coe_fr);
	writeln('Arabe,Sport,IS,HG,Englais:',coe_otre);
	writeln('le coeficient general est de :',coe_general);
	writeln('Chargement...');
	writeln('Changez les coeficient (Y/N)');
    case ans of
    'Y':set2_coe;
	'N': take_marks;
    else writeln('Choix impossible');
	end;
 end;
 
 
	procedure start;
	begin
	GotoXY(12,40);
	writeln('Bienvenue au calculateur de moyenne general');
	writeln('Que voulez vous faire?');
	writeln('1.Regler les coéficients?');
	writeln('2.Calculer une moyenne');
	readln(choix);
	case choix of
 	1:set1_coe;
	2:take_marks
	else writeln('Choix impossible');
 	end;
  end;
BEGIN
rule_vars;
start;
readln;
END.
Le source fait 120 lignes mais j'ai pas mal besoin d'aide

Bug trouvé!:
1 : Menu qui renvoi directement a l'instruction du else sans aborder l'utilisateur