Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Calculatrice 1.0
//fpc 3.0.0 program Calculatrice; var firstnumber: real; var secondnumber: real; var option: real; var result: real; begin writeln('Bienvenue dans la calculatrice !'); writeln('Choisis une option:'); writeln('1. Addition'); writeln('2. Soustraction'); writeln('3. Multiplication'); writeln('4. Division'); writeln('5. Sortir'); readln(option); if (option>5) then begin writeln('Choix non reconnu !'); exit; end; if (option=5) then begin writeln('Au revoir cher utilisateur !'); exit; end; writeln('Quel est ton premier nombre ?'); readln(firstnumber); writeln('Quel est ton deuxième nombre ?'); readln(secondnumber); if (option=1) then begin result:= firstnumber + secondnumber end; if (option=2) then begin result:= firstnumber - secondnumber end; if (option=3) then begin result:= firstnumber * secondnumber end; if (option=4) then begin result:= firstnumber / secondnumber end; writeln('Le résultat vaut: ',result:1:3, '!'); end.
run
|
edit
|
history
|
help
0
Первая задание
ariketa 05
sandogh 1
nomer9
Program summa
test01
Tri1
BITcustom
solar_system_n_(20)_planets_an_time
practica 3 ejercicio B3