Student in panic!
I need a program which simulates licquid in a tank. The user is supposed to write down a value and after that it´s supposed to be written a vertical line whith (I) and the column will be graduated 10, 20, 30 and 40. All this will be centered on the screen. I need two FOR loops, one for the column and one for the graduation.
Sincerely,
Erika
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
If I am not mistaken, first the user needs to enter the water depth, so something like this will do the trick:

uses crt;
var WaterDepth,loop1,loop2:byte;
begin
repeat
writeln('Enter Water Depth (10, 20, 30, 40):  ');
{Check to make sure WaterDepth within valid range}
until WaterDepth in [10,20,30,40];

clrscr;

for loop1:=1 to 9 do
if (loop1 mod 2 = 0) then begin
gotoxy(36,loop1+7);
case loop1 of
2:write('40 | |');
4:write('30 | |');
6:write('20 | |');
8:write('10 | |');
end;
end else begin
gotoxy(39,loop1+7);
write('| |');
end;

gotoxy(39,8+loop1);
write('___');

{For the water, just make another case statement and in the case blocks (i.e. case WaterDepth of ... 10:begin for ... do) do a for loop to draw the water depth using gotoxy like I showed above.  Hope this all helps.  BTW, no guarentee on the code, never tested it out...}
0

Experts Exchange Solution brought to you by