+ 1

# Can anyone help me in the Solution of hovercraft

10 Answers

+ 5

Use the exact word as given in the question!
Instead of "it's a profit" write "Profit"
Instead of "it's a loss" write "Loss"
And for the case of 7 show "Broke Even"

+ 3

First of all, you are making 10 hovercrafts each of 2,000,000. And also pay 1,000,000 for insurance.
So your total cost will be:
= (2,000,000 Ã— 10) + 1,000,000
= 21,000,000
The number of hovercrafts will be input as an integer. Let's call it num.
Now you sell them for 3,000,000 each. So the total money you make will be:
= 3,000,000 Ã— num
You can check for the following conditions and output accordingly:
1. If the money made is greater than the total cost, you've made a profit.
2. If it's lower, you made a loss.
3. If both are equal, it's a broke even
I would encourage you to write the code by yourself.

+ 2

Ali shah jindani
thank you .I intend to do it myself
I am having trouble picturing it
I'm originally not a math Student .
Thank you once again.

+ 2

Blue Dot. This will help you
https://code.sololearn.com/cZvlMA9B7A9R/?ref=app

+ 2

Thank you Namit jain
I actually did write profit ,loss and broke even but it did not work then i looked deeper , my mistake was that it was all in lower case alphabets....

+ 1

Yes I can if you show me your attempt

+ 1

Blue Dot.
I'm glad you liked the explanation. If you face any difficulty in writing the code, feel free to ask.
And don't worry if you were unable to picture it. You'll get better with practice.

+ 1

I tried doing it my self it took me about 90 mins thank you for all of your help... do check it out
https://code.sololearn.com/ceU0aKP7rAnw/?ref=app

+ 1

And could you all tell me why is this code wrong when it does the same thing i also corrected all the print functions namely too broke even, profit and loss

Hot today

What is indentations... ?

6 Votes

int num = 2;
int x = 3;
if(num >= 2) {
if(x > 4) { num = 3; }
else { num = 4; }
}
else {x = 1; }

1 Votes

About Java McQ

0 Votes

Need solution

0 Votes

YouTube Link Finder

0 Votes

Need solution

0 Votes