Question: A. Write a statement that defines an int variable named distance, initialized with the value 100. B Write a statement that defines a double variable
B Write a statement that defines a double variable named result, initialized with the value 6.759.
C Assume a double variable named number has been defined. Write a statement that calculates 100 divided by 5 and assigns the result to the number variable.
D Assume that three double variables named result, number1, and number2 have been defined, and have been assigned values. Write a statement that assigns the value of number1 multiplied by number2 to result.
E Write a statement that defines a named constant named SPEED. The constant's data type should be int, and its value should be 75.
F Consider Program 2-19 below. Rearrange the lines of code to fix the scope error, yielding a correct C++ program that prints the number 100. #include using namespace std; int main() { cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
