1rm - System.out.println("Enter your first...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package rm; import javax.swing.*; // For JFrame import java.awt.*; // For Color and Container import java.util.Scanner; import java.text.DecimalFormat; /** * * @author */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { String name; double RM; int Weight, Reps; Scanner input = new Scanner(System.in);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("Enter your first name:"); name = input.nextLine(); System.out.println("Enter the weight lifted:"); Weight = input.nextInt(); System.out.println("Enter the number of reps completed:"); Reps = input.nextInt(); System.out.println ("Good Work " +name); RM=Weight/(1.0278-(.0278*Reps)); DecimalFormat df1 = new DecimalFormat("###.0"); System.out.print("Your 1RM is " + df1.format(RM)); } }...
View Full Document

Ask a homework question - tutors are online