Question
C++ Thank you! 1. Give good variable names for each of the following: a. A variable to hold the speed of an automobile. b. A
C++ Thank you!
1. Give good variable names for each of the following: a. A variable to hold the speed of an automobile. b. A variable to hold the pay rate for an hourly employee. c. A variable to hold the highest score in an exam.
2. Write a complete C++ program that reads in two whole numbers and outputs their sum.
3. Convert each of the following mathematical formulas to a C++ expression: a. 3 b. 3 + c. x +y7 d. 3 + 7 + 2
4. Write a complete C++ program that reads two whole numbers into two variables of type int and then outputs both the whole-number part and the remainder when the first number is divided by the second.
5. Write an if-else statement that outputs the word Warning provided that either the value of the variable temperature is greater than or equal to 100, or the value of the variable pressure is greater than or equal to 200. Otherwise, the if-else statement outputs the word OK. The variables temperature and pressure are both of type int.
6. Write a complete C++ program that outputs the numbers 1 to 20, one per line.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started