I need help with my code to declare the total value.
--- Update ---
I'm trying to figure out where to declare my total.import java.util.Scanner; /** * * @author Joyce */ public class DownloadTimeApp { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String choice = "y"; while (choice.equalsIgnoreCase("y")) { System.out.println ("Welcome to the Download Time Estimator"); System.out.println(); //gets input from the user System.out.println("Enter file size (MB):"); int fileSize = sc.nextInt(); System.out.println("Enter download speed )(MB/sec):"); int totalSec = sc.nextInt(); //variables int total = total (fileSize / totalSec); int hours = totalSec / 3600; int minutes = (totalSec % 3600) / 60; int seconds = totalSec % 60; //calculated message System.out.println(); String message = "This download will take approximately" + hours + "hours" + minutes + "minutes" + seconds + "seconds"; System.out.println(message); //if user wants to continue System.out.print("Continue? (y/n): "); choice = sc.next(); System.out.println(); // TODO code application logic here } } }
this is my formula total = fileSize / totalSec