Thread: Please Someone Help

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    Question Please Someone Help

    I need to program the following:

    A company generates 61 percent of total sales. How much will the company generate if the company has $4.5 million in sales this year?

    I am new at programming and I have no clue where to start:

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    it's not really clear what you're asking. we won't do your homework but we will tell you this...

    start by figuring out what the user will need to input, what the computer will need to figure out, and what the computer will need to display. Write a flowchart. Once you have a flowchart, start figuring out what code it will take to accomplish each step in the flowchart.

    When you have something written, come back and ask a question.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    Registered User carrja99's Avatar
    Join Date
    Oct 2002
    Posts
    56

    Re: Please Someone Help

    Originally posted by survivor
    I need to program the following:

    A company generates 61 percent of total sales. How much will the company generate if the company has $4.5 million in sales this year?

    I am new at programming and I have no clue where to start:
    God, that's easy. The equation is simple,

    amount_generated = total_sales * percentage;

    Go read your book. Seriously.
    I am Error. When all else fails, use fire.

    My Current Screenshot

  4. #4
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    Arrow

    #include <iostream>
    int main()

    {
    int gross = 4500000;
    float percent_generated =0.61;
    int total_profit;

    for (gross = 4500000;total_profit=gross*percent_generated;gross *percent_generated)
    {cout<<"Out putting total profit "<<total_profit<<endl;}
    cin>>total_profit;
    return 0;
    }

    Enjoy the infinite spam lol ...
    PS: this equation works out even so no need for floats for gross or total_profit most money calculations need decimal places,

  5. #5
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361
    we won't do your homework but we will tell you this...
    God, that's easy. The equation is simple, ...
    It's funny how some things are just oblivious to people. You'd think after the first reply we'd let him(survivor) figure this out himself. Oh well...
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  6. #6
    Registered User carrja99's Avatar
    Join Date
    Oct 2002
    Posts
    56
    Originally posted by Spoonmaster
    #include <iostream>
    int main()

    {
    int gross = 4500000;
    float percent_generated =0.61;
    int total_profit;

    for (gross = 4500000;total_profit=gross*percent_generated;gross *percent_generated)
    {cout<<"Out putting total profit "<<total_profit<<endl;}
    cin>>total_profit;
    return 0;
    }

    Enjoy the infinite spam lol ...
    PS: this equation works out even so no need for floats for gross or total_profit most money calculations need decimal places,
    ack, why did you make it for him!? Next he'll ask "HELP! I need to make a program, the problem is to figure out how to print "hello World" to the screen. I am so new at programming! Please help!"

    What a retard.
    I am Error. When all else fails, use fire.

    My Current Screenshot

Popular pages Recent additions subscribe to a feed