Thread: Correct Way To Use GoTo (x,y)?

  1. #1
    Registered User
    Join Date
    Jan 2011

    Correct Way To Use GoTo (x,y)?

    Hi, I'm fairly new to Programming, currently taking my first course in it. For one of the assignments I have to do, I'm using nested loops to find the safe stopping distance of a car based on it's given speed and reaction time. And I need to print the information I find in a table, like such:

    10mph 20mph 30mph
    1sec x x x
    2sec x x x
    3sec x x x

    I've got all the code to find the info, but I don't understand the right way to use a goto(x,y) to plot the information corectly. Any help would be appreciated,


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    There is no correct way to use a goto(x,y), because there is no such thing as goto(x,y). You need to print your table a row at a time.

  3. #3
    The larch
    Join Date
    May 2006
    You might rather need to format the output, determining how long the fields are and how they are aligned, in case of doubles specify the precision etc.

    E.g with the printf function.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  4. #4
    Registered User
    Join Date
    Jan 2011
    Thank you, this has been very helpful.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Access to drive only with USB stick
    By spadez in forum Windows Programming
    Replies: 26
    Last Post: 08-26-2009, 06:52 PM
  2. Linux for GNU/Linux is not correct?
    By password636 in forum Linux Programming
    Replies: 8
    Last Post: 03-31-2009, 08:30 PM
  3. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  4. Does goto have a glitch or...?
    By Blackroot in forum C++ Programming
    Replies: 9
    Last Post: 02-18-2006, 10:40 AM
  5. How do i use Goto?
    By Unregistered in forum C++ Programming
    Replies: 18
    Last Post: 01-06-2002, 10:38 AM

Tags for this Thread