Question: This is all in C++ Part 2 - Types and their Representations Follow along with the instructor as you examine different types, their sizes and
This is all in C++
Part 2 - Types and their Representations
Follow along with the instructor as you examine different types, their sizes and bit patterns. Display the following output and shoot a screenshot showing:
What is the largest int on your platform
What is the difference between:
min() and lowest() for long
min() and lowest() for doubles
What is the bit pattern for these:
The char 'A'
The int 32768
The short 32768
The unsigned short 32768
15L
-15L
-15UL
3.5
-3.5
3.5F
3.5e38
3.5e-38
PART 3.
Basic IPO Programs: in Homework assignments 1 & 2 you learned how to write Input, Processing and Output programs. Use your IDE to design, code and test the problem shown here. Make sure that you test your program completely.
Here is the problem:
One way to measure the amount of energy that is expended during exercise is to use metabolic equivalents (METS). Here are some METS for various activities:
Running 6 MPH: 10 METS
Basketball: 8 METS
Sleeping: 1 MET
The calorie to MET conversion factor is .0175. The number of calories burned per minute may be estimated using the formula:
Calories/ Minute = factor METS (Weight in kilograms)
Write a program that inputs a subjects weight in pounds, the number of METS for an activity, and the number of minutes spent on that activity, and then prints out an estimate for the total number of calories burned. One kilogram is equal to 2.2 pounds.
Here is what the program should look like when it runs:
Your weight in pounds: 250
Number of METS for the activity: 6
Minutes spent exercising: 90
You burned an estimated [1073.86] calories.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
