Hi guys :)
I've just learn programming in turbo pascal, and my teacher made an assignment to make pyramid of numbers as this:
1
1 2
1 2 3
3 2 1
2 1
1
so far i've only come up as this:
uses crt;
var i,j,k : byte;
begin
clrscr;
for i := 1 to 3 do
begin
for j := 3 downto i do
begin
inc (k);
if i = 2 then k:=3;
gotoxy(i+k,j); write(i);
end;
end;
readkey;
end.
this is the output:
1
1 2
1 2 3
--------------------(2)------------------
And another one:
Make the word : "Hello" to "olleH"
do I have to use arrays on this one?
I'm totally blank on this one , please point me to the right direction..
----------------------------------------
Can anybody help me?
thanks..