Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program loop;
- {$APPTYPE CONSOLE}
- uses
- SysUtils, Crt32;
- var capture, pokeball, continue: byte;
- var pikachuCounter, totalPokeballs: integer;
- begin
- // Init
- pikachuCounter := 0;
- totalPokeballs := 0;
- TextColor(10);
- writeln('Pokemon Platine');
- writeln;
- repeat
- writeln('Un Pikachu sauvage apparait!');
- writeln('Voulez-vous le capturer?');
- writeln('1. Oui - 2. Non');
- readln(capture);
- if (capture = 1) then
- begin
- writeln('Combien de pokeballs avez-vous utilise?');
- readln(pokeball);
- writeln('Vous avez utilise ', pokeball, ' pokeballs pour capturer le Pikachu!');
- // Compteur de Pikachu
- pikachuCounter := pikachuCounter + 1;
- // Nombre total de Pokeballs utilisées pour capturer
- totalPokeballs := totalPokeballs + pokeball;
- end;
- if (capture = 2) then
- begin
- writeln('Vous prenez la fuite!');
- end;
- writeln('Voulez-vous continuer?');
- writeln('1. Oui - 2. Non');
- readln(continue);
- // Clear Screen
- ClrScr;
- until (continue = 2);
- writeln('Vous avez utilise ', totalPokeballs, ' pokeballs pour capturer ', pikachuCounter, ' Pikachu!');
- writeln('Appuyez sur [Entree] pour continuer...');
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement