// Loel Jolito Niño C. Bagabuyo
package marathon;
public class Marathon {
public static void main(String[] args) {
String[] names = {
"Jessabel", "Jerome", "Kristine", "Rodel", "Grajen", "Reymart", "Kevin",
"Sherwin", "Orniel", "John", "Kirk", "Jovert", "Rhea", "Mariella","Melart", "Michael"
};
double[] times = {
341.0, 273.0, 278.0, 329.0, 445.0, 402.0, 388.0, 275.0, 243.0, 334.0, 412.0, 393.0, 299.0, 343.0, 317.0, 265.0
};
for (int i = 0; i < times.length; i++) {
System.out.println(names + ": " + times);
times=i;
double minutes = 60.0;
double x = (times/minutes);
System.out.println(x);
}
}
}
This is my code iam using netbeans but I couldn't get the right minute for:
example 341/60 = 0.0 (wrong answer)<<< this is my output
341/60 = 5.6833 (Right answer)
Where did I go wrong?