Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

CIS355 - JAVA command line body mass calculator

Seeker
Seeker 


Create a simple command line application that will calculate the body mass from 2 input dialogs that take in a height and a weight Attachments
Tags Clarifications

Answers

JAVA BMI calculator

Seeker
Seeker 



import javax.swing.JOptionPane;

public class BodyMass
{

public static void main(String[] args)
{
String height, weight;
int inches, pounds;
double kilograms, meters, index;

System.out.println("\tTHE FITNESS CENTER BODY MASS CALCULATOR");
System.out.println();
height = JOptionPane.showInputDialog(null,...
Attachments
BodyMass.java (1 K) Download Preview
height to the nearest inch: "); inches = Integer.parseInt(height); weight = JOptionPane.showInputDialog(null, "Enter your weight to the nearest pound: "); pounds = Integer.parseInt(weight); meters = inches / 39.36;

Screenshots
Purchase Answer