Basic data types, keyboard input and conditional statements The front tires of a car should both have the same pressure. Also, the rear tires of a car should both have the same pressure (but not neccessarily the same pressure as the front tires.) Write an interactive program that gets from the keyboard the pressure of the four tires and writes a message that says if the inflation is OK or not and also displays the average pressure of all the tires. Input right front pressure 38 Input left front pressure 38 Input right rear pressure 42 Input left rear pressure 42
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
- Basic data types, keyboard input and conditional statements
- The front tires of a car should both have the same pressure. Also, the rear tires of a car should both have the same pressure (but not neccessarily the same pressure as the front tires.) Write an interactive
program that gets from the keyboard the pressure of the four tires and writes a message that says if the inflation is OK or not and also displays the average pressure of all the tires.
Input right front pressure
38
Input left front pressure
38
Input right rear pressure
42
Input left rear pressure
42
As there is no programming language mentioned so program is attempted in java language
- Start
- input right front pressure
- input left front pressure
- input right rear pressure
- input left rear pressure
- if (rightF == leftF && rightR == leftR)
- print inflation of your tires is OK.
- else
- The inflation of your tires is not OK.
- print average
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images