6a. Write A Program That Reads in Five Integers and Determines and Prints The Largest and The Smallest Integers in The Group
6a. Write A Program That Reads in Five Integers and Determines and Prints The Largest and The Smallest Integers in The Group
Write a program that asks the user to enter two integers, obtains the
numbers from the user, then prints the larger number followed by the words "is
larger." If the numbers are equal, print the message "These numbers are equal."
6b. Write a program that reads an integer and determines and prints whether
it’s odd or even. [Hint: Use the modulus operator. An even number is a multiple of
two. Any multiple of two leaves a remainder of zero when divided by 2.]
7. Write a program that reads in two integers and determines and prints if the first
is a multiple of the second. [Hint: Use the modulus operator.]
8. Write a program that inputs a five-digit integer, separates the integer into its
digits and prints them separated by three spaces each. [Hint: Use the integer
division and modulus operators.] For example, if the user types in 42339, the
program should print:
10. (Body Mass Index Calculator)
The formulas for calculating BMI are
Create a BMI calculator application that reads the user’s weight in kilograms and
height in meters, then calculates and displays
the user’s body mass index. Also, the application should display the following
information from the Department of Health and Human Services/National
Institutes of Health so the user can evaluate
his/her BMI: