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:
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:
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
God, that's easy. The equation is simple,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:
amount_generated = total_sales * percentage;
Go read your book. Seriously.
#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,
we won't do your homework but we will tell you this...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...God, that's easy. The equation is simple, ...
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)
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!"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,
What a retard.