C++ Help!

This is a discussion on C++ Help! within the C++ Programming forums, part of the General Programming Boards category; /*Object of program is to find the cheapest combination of large and medium pizzas based on the number of inputted ...

  1. #1
    Unregistered
    Guest

    Thumbs up C++ Help!

    /*Object of program is to find the cheapest combination of large and medium pizzas based on the number of inputted slices. I can do the program but can't get it to alternate between sizes, I can only do one size for the best profit.*/

    //Large pizza= 11$ 16 slices
    //medium pizza= 8$ 10 slices
    //cin the slices

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    LOL

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    reply

    Well, if you post the code (so far you've come) and try to explain exactly whats wrong I'm sure you'll get some help .
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    16
    In reality don't they cut the same number of pieces for every pizza? It'd make more sense to find the diameter of each pizza then calculate the area. But of course you still run into the problem of smaller pieces having a larger crust to pizza ratio...darn crusts. But I guess thats a problem of personal preference.

    But anyway, could you post your current code ?

    "I once saw a photograph of a large
    herd of wild elephants in Central
    Africa seeing an airplane for the first
    time, and all in a state of wild
    collective terror... As, however, there
    were no journalists among them, the
    terror died down when the airplane
    was out of sight. "


    - Bertrand Russell


Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21