fork(9) download
  1. program Moy_Rang;
  2. Const n=30;
  3. Var Nom : Array [1..n, 1..2] of String [50];
  4. Note : Array [1..n, 1..4] of Real;
  5. j, i, a, b : Integer;
  6. Begin
  7. For i:=1 To n Do
  8. Begin
  9. Writeln ('Elèves n° ', i);
  10. Writeln ('Nom : ');
  11. Readln (nom[i,1]);
  12. Writeln ('Prénom : ');
  13. Readln (nom[i,2]);
  14. For j:=1 To 2 Do
  15. Repeat
  16. Writeln ('Note ', j, ' : ');
  17. Readln (note[i,j]);
  18. Until (note[i,j]>=0) and (note[i,j]<=20);
  19. note[i,3] := (note[i,1]+note[i,2]*2)/3;
  20. End;
  21. For i:=1 To n Do
  22. Begin
  23. note[i,4]:=1;
  24. For j:=1 To n Do
  25. If note[i,3]<note[j,3] Then note[i,4]:=note[i,4]+1;
  26. End;
  27. Writeln ('Nom', 'Prénom':15, 'Note 1':10, 'Note 2':10, 'Moyens':10, 'Rangs':10);
  28. For i:=1 To n Do Begin
  29. a:=Length (nom[i,1]);
  30. b:=Length (nom[i,2]);
  31. Writeln (nom[i,1],nom[i,2]:(12-a+b),note[i,1]:(15-b):2,note[i,2]:10:2,note[i,3]:10:2,trunc(note[i,4]):9);
  32. End;
  33. End.
Runtime error #stdin #stdout 0s 292KB
stdin
1
ali
ben ali 
2
ahmed
ben ahmed
3
salah
ben salah
4
khaled
ben khaled
5
samir
ben samir
6
ramzi
ben ramzi
15
16
14
8
9
7
stdout
Elèves n° 1
Nom : 
Prénom : 
Note 1 : 
Runtime error 106 at $08048241
  $08048241
  $08063B93