This site requires JavaScript, please enable it in your browser!
Greenfoot back
someone1
someone1 wrote ...

2015/8/17

Need help with this

someone1 someone1

2015/8/17

#
I know this probably is simply but i have a problem, for every 100 liters you have to put one liter of food colouring, How would i do this for example if i have 200 liters the program will print out 2 liters, in my program i ask the user to enter how many liters and the program has to print out the result so if the user enters 115 liters the program returns 1.15 liters of food colouring I already have the method to get the user input i just need a way to find the amount of food colouring Thanx
someone1 someone1

2015/8/18

#
Sry guys, i found an answer thanx anyway
someone1 someone1

2015/8/18

#
Wait no it dosnt work
someone1 someone1

2015/8/18

#
Sry need help again
danpost danpost

2015/8/18

#
That is just a basic ratio problem. Use 'double' or 'float' type values to allow for the fractional portion of the answer. For further instruction, make an attempt at it and if problem persist, show the code you tried with detailed explanation.
someone1 someone1

2015/8/18

#
I solved this problem now thanx anyway
You need to login to post a reply.