- 5
Help me please
Hovercraft +10 XP You run a hovercraft factory. Your factory makes ten hovercrafts in a month. Given the number of customers you got that month, did you make a profit? It costs you 2,000,000 to build a hovercraft, and you are selling them for 3,000,000. You also pay 1,000,000 each month for insurance. Task: Determine whether or not you made a profit based on how many of the ten hovercrafts you were able to sell that month. Input Format: An integer that represents the sales that you made that month. Output Format: A string that says 'Profit', 'Loss', or 'Broke Even'. Sample Input: 5 Sample Output: Loss Explanation: If you only sold 5 hovercrafts, you spent 21,000,000 to operate but only made 15,000,000.
7 Answers
+ 8
Ah, there's the problem. You are supposed to put your code inside the main function 😉
Please show some effort, we are not here to post solutions for homeworks
+ 4
You build 10 hovercrafts each month.
You pay 2,000,000 to build 1 hovercraft.
You sell your hovercrafts for 3,000,000 per unit.
You also pay 1,000,000 each month for insurance.
How many hovercrafts do you need to sell in one month, to profit?
Hint: (10 hovercrafts * 2000000) + 1000000 is the monthly cost of your business.
+ 2
put your code here
+ 1
The first thing you wanna do 🇷🇺divanish🇷🇺 is to show us or your audience what you have done so far, in order to get help.
Don't take it as a punishment or something. We're trying to make sure that you are truly trying the challenges on your own and not just seeking answers for the challenge quizzes.
Who knows, maybe you're right in code but you missed something small, or maybe you started wrongly... This is how I learnt to ask for help in SoloLearn
0
Start writing what you already know.
unitCostProd=2m
unitPriceSell =3m
monthlyInsurance=1m;
//Ask user for number of unitsSold
totalProfit=
(unitPriceSell-unitCostProd) x unitsSold
totalCost=
unitsSold x unitCostProd
+ monthlyinsurance
//Now check wether
//totalCost >< totalProfit
//and print accordingly
- 1
I just do not understand the wording of the assignment
- 3
#include <iostream>
using namespace std;
int main() {
return 0;
}