Question: 1. Compose a single C++ programming statement that will declare the variables named hour, minute, and second to be integer (int) data type. 2. Compose

1. Compose a single C++ programming statement that will declare the variables named hour, minute, and second to be integer (int) data type.

2. Compose the C++ statement(s) necessary to declare an integer variable named scale and initialize its value to 42.

3. Assume that a double variable named energy has the value 3,220.2567. Assume also that your code includes the header. Use your knowledge of formatting to compose a single C++ programming statement that will display the value of the variable named energy in such a way that it displays 3 digits after the decimal point. (Your code should not display the value using scientific notation.)

4. A variable named alpha must be properly declared as a double and assigned the value 3.25. Compose the C++ statements needed to do this, raise the value of the variable named alpha to the power 2.5, and assign the value of the result to a double variable named angle.

5. Assume that when prompted for their name, your user enters their full name (first name and last name separated by a space, possibly even including a middle initial). Compose the C++ programming statements that will:

  • declare a variable named client to have a string data type.
  • prompt the user for their full name.
  • read the users complete entry and store it in the variable named client.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!