Help getting started

This is a discussion on Help getting started within the C++ Programming forums, part of the General Programming Boards category; Can anyone help me get my C++ engine started? My problem states that on the first day, a store gives ...

  1. #1
    Unregistered
    Guest

    Question Help getting started

    Can anyone help me get my C++ engine started? My problem states that on the first day, a store gives x% discount off a the price of a certain item. On day 2, it gives x% discount off the day 1 price. I'm trying to write a program to input the original price and discount, and determine on what day the price drops to less than half the original price I can really use the help. Thanks

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Set Prize value
    Set DiscountPercent value
    Set HalfPrize value to Prize value / 2
    Set DayCounter to 0

    Loop while Prize > HalfPrize

    Set Prize to Prize - (Prize * (DiscountPercent / 100) )
    Add 1 to DayCounter

    End loop

    Print DayCounter
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help getting started :(
    By blackocellaris in forum C Programming
    Replies: 4
    Last Post: 11-05-2006, 05:50 PM
  2. Getting started
    By panzeriti in forum Game Programming
    Replies: 3
    Last Post: 06-28-2003, 10:13 AM
  3. Getting Started
    By UnclePunker in forum Game Programming
    Replies: 3
    Last Post: 04-11-2003, 12:34 PM
  4. How to get started?
    By anoopks in forum Linux Programming
    Replies: 0
    Last Post: 01-14-2003, 02:48 AM
  5. Need help getting started
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2001, 11:08 PM

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