Why is BlueJ is giving any answer the same value as I gave in input ?
I have been facing this problem since two months ago. I had written a program which I had declared the variables as 0 or 0.0 as mentioned in the question. When I had executed the program and gave the input(≠ 0), to my great amazement, it came the same result as input, which was very unexpectable . Later, by doing several experiments, I concluded that "It is not doing any operations which I have programmed it to do." How can I resolve it? Here are the codes(Please execute these codes in BlueJ Environment) : https://code.sololearn.com/c2OzIIWda3T2/?ref=app https://code.sololearn.com/c49gQqDr34Cf/?ref=app [Edited: I would like to thank "zemiak" and "~swim~" for their due efforts to make my program successful. I wanted to mark both of their answers as the best answer. But I was not able to do so. So, I marked neither of them as the best answer. What did they said is that I did "int/int(for percentage) * double", which was causing all the troubles. ]