Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***************************
- PROG 10082 Homework 1
- Alexander Safos
- 991570144
- Sept 16th 2019
- **************************/
- public class Main {
- public static void main(String[] args) {
- System.out.println("Welcome to Alex's First Programming Assignment!");
- //Q1
- int basketball =8;
- int running =10;
- int sleeping =1;
- int weight =0;
- double poundsToKilos =0.454;
- double factor = 1.05;
- double totalCals = sleeping + basketball +running;
- double mins = 30;
- double minsToHours = mins/60;
- double hours= minsToHours;
- double sleepTime=6.5;
- weight = (int) (125 * poundsToKilos);
- running = (int) ((int)(factor * running * weight) *minsToHours);
- mins=40;
- basketball = (int) ((int) (factor * basketball * weight)*minsToHours);
- sleeping = (int) ((int) (factor * sleeping * weight) *sleepTime);
- System.out.println(sleeping);
- System.out.println(basketball);
- System.out.println(running);
- System.out.println("The total number of calories burned is " + totalCals);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement