Thread: Rides Calculator

  1. #1
    Registered User
    Join Date
    Jun 2015
    Posts
    4

    Rides Calculator

    I'm trying to write a code that will determine the 3 rides that the user can ride in 60 minutes without exceeding 60 minutes. The program will ask the user for the wait times of 5 rides. Given that rides can only be ridden once and the time to walk between rides is 2 minutes and the ride times are 3 minutes.
    I know that using if-else statements will make it longer but I'm not entirely sure how to use loops.
    Thanks!

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Welcome to the forum.

    You need to be more clear about the problem you're having. The way this forum works is that you give it your best shot, and if you get stuck, post your code (in code tags) and ask specific questions about what you're stuck on (see the homework policy).

    Some general advice (which I've already told someone else today):

    You need to plan the program before you write it. If you do not know how to solve a problem yourself, you cannot program a computer to solve it for you.

    Start with figuring out how to solve the problem "by hand", with a pen and paper. When you have a good understanding, go through the logic you used step by step. These steps can be used to start generating your code.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best possible rides?
    By Andres Posadas in forum C Programming
    Replies: 10
    Last Post: 06-11-2015, 04:15 PM
  2. Calculator Help
    By gnomelook in forum C Programming
    Replies: 3
    Last Post: 01-08-2012, 01:45 AM
  3. Calculator
    By xetehkah in forum C Programming
    Replies: 2
    Last Post: 01-28-2009, 12:29 AM
  4. Calculator
    By ShOcKJ in forum C++ Programming
    Replies: 7
    Last Post: 02-06-2006, 01:11 AM
  5. Calculator in C?
    By daveS in forum C Programming
    Replies: 5
    Last Post: 08-04-2003, 10:37 AM

Tags for this Thread