merci pour ta réponse, j'ai deja rectifier ce que tu ma fais remarqué mais j'ai encore 3 erreurs dans mon code:
16 / 16 calcul~1.pas
Error: Constant and CASE types do not match
16 / 16 calcul~1.pas
Error: Ordinal expression expected
16 / 16 calcul~1.pas
Fatal: Syntax error, : expected but ; found
Je vois vraiment pas d'ou ça viens. Mon code:
Program Calculatrice;
Var a: integer; b, c, d: real;
Begin
WriteLn
('-------------------Calculatrice-----------------
--');
WriteLn;
WriteLn ('1. Addition');
WriteLn ('2. Soustraction');
WriteLn ('3. Division');
WriteLn ('4. Multiplication');
WriteLn;
WriteLn ('Entrer le chiffre qui correspond a ce que vous voulez faire:');
ReadLn (a);
Case a of
2: WriteLn (' Entrez un premier nombre:');
ReadLn (b);
WriteLn (' Entrez un second nombre:');
ReadLn (c);
d:=b-c;
WriteLn ('La réponse est:');
WriteLn (d);
3: WriteLn (' Entrez un premier nombre:');
ReadLn (b);
WriteLn (' Entrez un second nombre:');
ReadLn (c);
d:=b/c;
WriteLn ('La réponse est:');
WriteLn (d);
4: WriteLn(' Entrez un premier nombre:');
ReadLn (b);
WriteLn(' Entrez un second nombre:');
ReadLn (c);
d:=b*c;
WriteLn ('La réponse est:');
WriteLn (d);
End;
ReadLn
End.