enquanto numero diferente de zero e coloca depois ao terminar,
no terminal a soma dos numeros introduzidos.
EN: program that asks the user to integers.
When number entered is zero, the program terminates.
It appears in the terminal the sum of input numbers.
FR: programme qui demande à l'utilisateur de nombres entiers.
Lorsque le numéro entré est zéro, le programme se termine.
Il apparaît dans le terminal la somme des nombres d'entrée.
The Output of the program
The text of the Program
program soma;
uses crt;
var value,total : integer;
begin
total:=0;
writeln;
writeln;
writeln;
writeln('PT: Escreva numeros inteiros, termine com 0');
writeln('EN: Write integer numbers, write 0 to the end');
writeln('FR: Ecrivez de numero entiere. mettre 0 pour finir');
repeat
read(value);
total:=total+value;
until value=0;
writeln;
writeln('PT: A soma dos valores introduzidos é ',total);
writeln('EN: The sum of the numbers is ',total);
writeln('FR: La adition de ces numeros est ',total);
end.
uses crt;
var value,total : integer;
begin
total:=0;
writeln;
writeln;
writeln;
writeln('PT: Escreva numeros inteiros, termine com 0');
writeln('EN: Write integer numbers, write 0 to the end');
writeln('FR: Ecrivez de numero entiere. mettre 0 pour finir');
repeat
read(value);
total:=total+value;
until value=0;
writeln;
writeln('PT: A soma dos valores introduzidos é ',total);
writeln('EN: The sum of the numbers is ',total);
writeln('FR: La adition de ces numeros est ',total);
end.
Sem comentários:
Enviar um comentário