This is the Question:-
3)Implement oon pascal a program to produce the following output:-
*
**
***
****
*****
The number of rows to be printed on the screen should be specified buy the user nad you have to use for loops.
i have done the bit where it just outputs:-
*
**
***
****
*****
but the bit i can do is for the user to specify the number of lines there are?
this is my programming language for the bit i have done:-
Program Question_3;
Uses Wincrt;
Var
x : integer;
Begin
For x:= 1 to 1 do
Begin
write('*')
End;
writeln;
For x:= 1 to 2 do
Begin
write('*')
End;
writeln;
For x:= 1 to 3 do
Begin
write('*')
End;
writeln;
For x:= 1 to 4 do
Begin
write('*')
End;
writeln;
For x:= 1 to 5 do
Begin
write('*')
End;
writeln;
End.