fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13.  
  14.  
  15. int ageYears, weightPounds, heartRate, timeMinutes;
  16. float avgCalorieBurn;
  17.  
  18. ageYears = 49;
  19. weightPounds = 155;
  20. heartRate = 148;
  21. timeMinutes = 60;
  22.  
  23. avgCalorieBurn = ((ageYears * 0.2757f) + (weightPounds * 0.03295f) + (heartRate * 1.0781f) - 75.4991f) * timeMinutes / 8.368f;
  24.  
  25.  
  26. System.out.printf("Calories: %.2f",avgCalorieBurn);
  27. }
  28. }
Success #stdin #stdout 0.14s 54216KB
stdin
Standard input is empty
stdout
Calories: 736.21