Hi!
First of all i know you don't help with homework to those that are not trying to solve it themselves but I REALLY TRIED...i am Embarrassed to say but I am trying to do this for few days already and my deadline for homework is getting close and I need to give result.
So I am asking you please please to help me with this :)
This is my task…
I made it this way only my assistant told me that it is correct BUT he needs it other way…
This is program I made
program toy;
uses crt;
VAR option : integer;
procedure ShowMenu;
begin
writeln('+------------------+');
writeln('| MENU |');
writeln('+------------------+');
writeln('| Options: |');
writeln('| 1=laughs |');
writeln('| 2=cries |');
writeln('| 3=sings |');
writeln('| 0=sleeps |');
writeln('+------------------+');
end;
procedure ChooseOption;
Begin
if option=1 then writeln('Toy is laughing!') else
if option=2 then writeln('Toy is crying!') else
if option=3 then writeln('Toy is singing!') else
writeln('The option you chose does not exist!');
delay(2000);
write('Choose option: ');
read(option);
readln;
end;
begin
ShowMenu;
write('Choose option: ');
read(option);
while option<>0 do
ChooseOption;
writeln('Toy is sleeping!');
readln;
end.
--------
so....what he wants is we to make a procedure that takes a parameter (which i tried and tried and tried and can't get it at all) and that parameter is the value of option and it will print out on screen same as i got..
i realllllyyyy tried but only i reached the point where it prints on my screen same ...for example toy is laughing ..and hundreds like that...
please please help :)
thanks a lot