Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function InptPlus2(inpt:integer):integer;
- begin
- InptPlus2:=inpt+2; //add to input value 2
- end;
- var n,i,outp:integer;
- begin
- read(n); //read input
- outp:=0;
- for i:=1 to n do //repeat loop n times
- begin
- outp:=InptPlus2(outp); //add to value 2
- write(outp,' '); //write output in line
- end;
- end.
Add Comment
Please, Sign In to add comment