Question: Help!! 1. Compose a single C++ programming statement that will declare the variable named hour to be integer (int) data type with an initial value

Help!!
Help!! 1. Compose a single C++ programming statement that will declare the
variable named hour to be integer (int) data type with an initial

1. Compose a single C++ programming statement that will declare the variable named hour to be integer (int) data type with an initial value of 23 . 2. The formula for calculating the area of a right triangle is: area=21(baseheight) Convert the above algebraic expression for calculating the area of a right triangle to an equivalent C++ programming statement that works correctly. 3. Compose the C++ code that will declare a double variable named energy to have an initial value of 34,220.76584. Assume that your code already includes the C++ programming statements 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 data type and assigned the value 3.275. Compose the C++ statements needed to do this and raise the value of the variable named alpha to the power 2.5 assigning 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 customer to have a string data type. - prompt the user for their full name. - read the user's complete entry and store it in the variable named A bag of cookies holds 42 cookies. The calorie information on the bag claims that there are 7 servings in the bag and that a single serving equals 315 calories. Design and write a C++ program that prompts your user for the number of cookies that they ate from one of these bags and then displays the total number of calories they consumed. Include your full name as part of a comment line within the program you submit. Be aware that someone may eat two and a half cookies. We want you to learn how to write programs that are robust and potentially reusable. Use variables to represent all the given information, such as the number of cookies in a bag and the number of calories in a serving. Compose statements using the given variables to calculate the number of calories in each cookie. The use of magic is not permitted in computer programming. You, as the programmer must compose steps that store given information in variables and then use these variables to determine values such as the number of calories in each cookie. Submit the C++ source code file (.,pp) you created to solve this Programming Exercise along with the word processing file that contaiss your answers to the Questions above. NOTE: Remember to submit both files; the word processing file that contains your answers to the questions above and the source code file that contains your solution to the cookie-based programming exercise

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!