Respuesta :
public void printpopcorntime(int bagounces) {
if (bagounces < 3) {
System.out.println("too small");
} else if (bagounces > 10) {
System.out.println("too large");
} else {
System.out.println( 6*bagounces +"seconds");
}
System.out.println("\n");
}
Answer:
/* Your solution goes here */
if(bagOunces < 3) {
System.out.println("Too small");
}
else if ( bagOunces > 10) {
System.out.println("Too large");
}
else {
System.out.println(6 * bagOunces + " seconds");
}
System.out.print("");
Explanation:
/* Explanation */
if(bagOunces < 3) { //if bagounces is less than 3
System.out.println("Too small"); //print "too small".
}
else if ( bagOunces > 10) { //if greater than 10
System.out.println("Too large"); //print "too large".
}
else { //otherwise
System.out.println(6 * bagOunces + " seconds");
} //compute and print 6 * bagounces followed by "seconds".
System.out.print(""); //end with a newline.
Hope this helps a bit with how I translated the code.