Advertisement
henriqueforino

Maior número

Dec 6th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.43 KB | None | 0 0
  1. program FORINO;
  2. uses crt;
  3. var
  4.    x, y, maior: real;
  5. begin
  6.      repeat
  7.            writeln ('Digite um valor: ');
  8.            readln (x);
  9.            maior:= x;
  10.  
  11.            if x > maior then
  12.              maior := x;
  13.  
  14.              writeln ('Deseja continuar?');
  15.              writeln ('1 - Sim, 0 - Nao');
  16.              readln (y);
  17.      until y = 0;
  18.      clrscr;
  19.      writeln ('O maior valor é: ', maior :0:2);
  20.      readln ();
  21. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement