subject
Computers and Technology, 25.06.2019 15:10 seoulux

Write a program to compute the ideal weight for both males and females in java. according to one study, the ideal weight for a female is 100 pounds plus 5 pounds for each inch in height over 5 feet. for example, the ideal weight for a female who is 5'3" would be 100 + 3*5 = 115 pounds. for a male, the ideal weight is 106 pounds plus 6 pounds for each inch in height over 5 feet. for example, the ideal weight for a male who is 5'3" would be 106 + 3*6 = 124 pounds. your program should ask the user to enter his/her height in feet and inches (both as integers—so a person 5'3" would enter the 5 and the 3). it should then compute and print both the ideal weight for a female and the ideal weight for a male. the general outline of your main function would be as follows: (1) declare your variables (think about what variables you need—you need to input two pieces of information, then you need some variables for your calculations (see the following steps) (2) get the input (height in feet and inches) from the user (3) compute the total number of inches of height (convert feet and inches to total inches (note: 1 foot equal 12 inches and hence 5 feet equal 60 inches. (4) compute the ideal weight for a female and the ideal weight for a male (5) print the answers.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
What is the algorithm for building a binary tree program
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
You know the right answer?
Write a program to compute the ideal weight for both males and females in java. according to one stu...
Questions
Questions on the website: 13722361