Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { paulogp }
- Program Peda_09 (Input, Output);
- Uses
- WinCrt;
- Var
- Valor_Inicial, Incremento, Soma: Integer;
- Fim: Char;
- Begin
- Repeat
- ClrScr;
- WriteLn('Programa: Sequencia de numeros.');
- WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
- Repeat
- WriteLn;
- Write('Introduza o valor inicial [10,20]: ');
- ReadLn(Valor_Inicial);
- Until (Valor_Inicial >= 10) and (Valor_Inicial <= 20);
- Repeat
- WriteLn;
- Write('Introduza o incremento [ 5,10]: ');
- ReadLn(Incremento);
- Until (Incremento >= 5) and (Incremento <= 10);
- Soma:= Valor_Inicial;
- WriteLn;
- While Soma <= 1000 do
- Begin
- WriteLn(Soma);
- Soma:= Soma + Incremento;
- End;
- WriteLn;
- WriteLn;
- Write('Repetir programa (S/N)? ');
- Fim:=ReadKey;
- Until UpCase(Fim)='N';
- DoneWinCrt;
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement