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

24th Feb 2020, 8:00 AM
🇷🇺divanish🇷🇺
🇷🇺divanish🇷🇺 - avatar
7 odpowiedzi
+ 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
24th Feb 2020, 10:06 AM
Matthias
Matthias - avatar
+ 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.
24th Feb 2020, 12:21 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
put your code here
24th Feb 2020, 8:04 AM
Taste
Taste - avatar
+ 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
24th Feb 2020, 10:17 PM
Walter
Walter - avatar
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
24th Feb 2020, 3:35 PM
another guy
another guy - avatar
- 1
I just do not understand the wording of the assignment
24th Feb 2020, 10:09 AM
🇷🇺divanish🇷🇺
🇷🇺divanish🇷🇺 - avatar
- 3
#include <iostream> using namespace std; int main() { return 0; }
24th Feb 2020, 8:06 AM
🇷🇺divanish🇷🇺
🇷🇺divanish🇷🇺 - avatar