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
array
test28
Project Euler 20 - Factorial digit sum
janja - naloga 2 - 25.1.2012
Урок 2 задача не из учебника: 4-значное число
nomer3
Tri 1.0
Potenztabelle
practica 1 ejercicio 4
practica 9 ejercicio 10