25th Feb 2020, 6:02 PM
X R I G E L
X R I G E L - avatar
14 Answers
+ 4
https://code.sololearn.com/crOfl8f24T1I/?ref=app
26th Feb 2020, 3:15 AM
Sonic
Sonic - avatar
+ 3
First problem I see: your program prints Loss when == and Broke Even for else. Shouldn't be the other way around? I'll edit my answer if I find more. Edit. Also your inequalities needs reviewing. You sould have on one side: month+insurance And on the other side: customer*selling
25th Feb 2020, 6:29 PM
Mihai Apostol
Mihai Apostol - avatar
+ 3
The problem specifying that They make 10 hovercrafts each one cost 2000000, and each sales 3000000,... he pays 10000000 insurance every month,... Now think again, cost per month, Is he getting more or less by selling 300000*sales. For less, print loss, For greater print profit For equal print broke even... Edit: If you paste code in playground and share link, then it will easy for one to look errors if any in code...
25th Feb 2020, 6:31 PM
Jayakrishna 🇮🇳
+ 1
X R I G E L If we give code, you don't get anything.. So Just read my description again, reply with what you not understand there... You just need to use your month value, you are right upto that.. Try.
25th Feb 2020, 6:43 PM
Jayakrishna 🇮🇳
+ 1
i did same too
26th Feb 2020, 9:42 AM
X R I G E L
X R I G E L - avatar
0
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int hovercraft= 2000000; int insurance =1000000; int selling =3000000; int month=10*hovercraft; int customer=Convert.ToInt32(Console.ReadLine()); if(customer*hovercraft+insurance < customer*selling +insurance){ Console.WriteLine("Profit"); } if(customer*hovercraft +insurance==customer*selling+insurance){ Console.WriteLine("Loss"); } else{ Console.WriteLine("Broke Even"); } } } }
25th Feb 2020, 6:02 PM
X R I G E L
X R I G E L - avatar
0
whats wrong i cannt figure out
25th Feb 2020, 6:02 PM
X R I G E L
X R I G E L - avatar
0
in factory you can make 10 i think he is getting more
25th Feb 2020, 6:33 PM
X R I G E L
X R I G E L - avatar
0
guys can you paste uour code i cannt understand with code i will figure it out if it is not problem 💜
25th Feb 2020, 6:37 PM
X R I G E L
X R I G E L - avatar
0
X R I G E L What's the point to paste our codes. It is better that you understand the problem, we can only guide you to the final answer.
25th Feb 2020, 6:41 PM
Mihai Apostol
Mihai Apostol - avatar
0
okey i will concentrate and if i will have some problem can i send message to you ? sorry for wrong words big fingers 😃
25th Feb 2020, 6:42 PM
X R I G E L
X R I G E L - avatar
0
Something to remember, your factory makes 10 and only 10 hovercrafts each month. You only pay insurance 1 per month. Hope this helps solve the riddle
26th Feb 2020, 1:18 AM
Rabinski
Rabinski - avatar
0
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int sales, revenue, expenditure; sales = Convert.ToInt32(Console.ReadLine()); revenue=sales*3000000; expenditure=10*2000000+1000000; if (revenue>expenditure) { Console.WriteLine("Profit"); } else if (expenditure>revenue) { Console.WriteLine("Loss"); } else if(expenditure==revenue){ Console.WriteLine("Broke Even"); } } } }
27th Feb 2020, 9:15 AM
MIKEJI
0
you add this last == please
27th Feb 2020, 9:16 AM
MIKEJI