Graduation a columm?

Posted on 1997-11-16
Last Modified: 2010-04-16
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.
Question by:gelotte
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

mitchell042997 earned 50 total points
ID: 1216791
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;
    writeln('Enter Water Depth (10, 20, 30, 40):  ');
    {Check to make sure WaterDepth within valid range}
  until WaterDepth in [10,20,30,40];


  {Loop to draw flask}
  for loop1:=1 to 9 do
    if (loop1 mod 2 = 0) then begin
      case loop1 of
        2:write('40 | |');
        4:write('30 | |');
        6:write('20 | |');
        8:write('10 | |');
    end else begin
      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...}

Author Comment

ID: 1216792
thanks mitchell it´s works

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WebCam and Delphi 2 2,738
How to capture screen window of a process 4 413
How do you get the IP address of a network? 12 289
Wininet read php file from internet issue 6 103
While it may be true that the internet is a place of possibilities, it is also a hostile environment lurking with many dangers. By clicking on the wrong link, trusting the wrong person or using a weak password, you are virtually inviting hackers to …
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question