
Hello Sir, I have a method in which i am getting getting wrong datavalues calculated from the function ...here is my code for this task....
try {
double min = 60;
double cost = 0;
double quotient = duration / min;
double rem = duration % min;
if (rem >= 0) {
double quotient1 = quotient + 1;
cost = quotient1 * rateperpulse;
System.out.println(cost);
}
duration is integer type and values like 59,142 etc
here i am getting wrong output for the same duration 59 i am getting wrong cost .. Sir plz help me in this code.Thank you Sir.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
