Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program calculatrice;
- var
- choice : byte;
- nombre1 : integer;
- nombre2 : integer;
- result : double;
- choice2 : byte;
- begin
- repeat
- Writeln('bienvenu dans la calculatrice');
- writeln('choisit ton option');
- writeln('1|addition');
- writeln('2|soustraction');
- writeln('3|multiplication');
- writeln('4|division');
- writeln('5|quitter');
- readln (choice);
- if choice = 5 then
- begin
- writeln('au revoir');
- exit
- end;
- if choice > 5 then
- begin
- writeln('arrete de te foutre de moi c n est pas dans le choix');
- Writeln('choisit un premier nombre');
- readln (nombre1);
- writeln('chopisit un deuxieme nombre');
- readln(nombre2);
- end;
- if choice = 1 then
- begin
- result := nombre1 + nombre2;
- Writeln('ton resultat est egale a',result:6:2);
- end;
- if choice = 2 then
- begin
- result := nombre1 - nombre2;
- Writeln('ton resultat est egale a',result:6:2);
- end;
- if choice = 3 then
- begin
- result := nombre1 * nombre2;
- Writeln('ton resultat est egale a',result:6:2);
- end;
- if choice = 4 then
- begin
- result := nombre1 / nombre2;
- Writeln('ton resultat est egale a',result:6:2);
- end;
- writeln('veut tu recommencer ecrit 1|2 pour oui|non');
- readln(choice2);
- writeln('choix: ', choice2);
- until choice2 = 2 ;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement