“Pascal enquanto” Respostas de código

Loop Pascal

Program PascalRepeatLoop;
Var 
number:integer;

begin
    number := 1;

    //REPEAT-UNTIL Statement - Post Condition Repetition
    Repeat      
        Write('Enter an integer number: ');
        readln(number);
    Until number = 0;       //Run code above, until "number" is 0
    
    Writeln();
    Writeln('Program Ended');
End.
ALeonidou

Pascal enquanto

Program PascalWhileLoop;
Var 
number:integer;

begin
    number := 1;

    //WHILE DO Statement - Pre Condition Repetition
    While number <> 0 do    //Run code below, while "number" is not 0
    begin
        Write('Enter an integer number: ');
        readln(number);
    end;
    
    Writeln();
    Writeln('Program Ended');
End.
ALeonidou

Respostas semelhantes a “Pascal enquanto”

Perguntas semelhantes a “Pascal enquanto”

Procure respostas de código populares por idioma

Procurar outros idiomas de código