subject

Write programs for the following (VS17 Express)

- Consider the following program in which the statements are in the incorrect order. Rearrange the statements so that the program prompts the user to input the height and the radius of the base of a cylinder and outputs the volume and surface area of the cylinder. Format the output to two decimal places.

#include

#include

int main()

{}

double height;

cout<<"Volume of the cylinder ="

<
cout<<"Enter the height of the cylinder:";

cin>>radius;

cout<
return 0;

cout<<"Surface area:"

<<2*PI *radius* height + 2 * PI * pow(radius, 2.0)

<
cout<
cout<<"Enter the radius of the base of the cylinder:";

cin>>height;

cout<
#include

const double PI=3.14159;

- Three employees in a company are up for a special pay increase. You are given a file, say Ch3_Ex6Data. txt, with the following data:

Miller Andrew 65789.87 5

Green Sheila 75892.56 6

Sethi Amit 74900.50 6.1

Each input line consists of an employee’s last name, first name, current salary, and percent pay increase. For example, in the first input line, the last name of the employee is Miller, the first name is Andrew, the current salary is 65789.87, and the pay increase is 5%. Write a program that reads data from the specified file and stores the output in the file Ch3_Ex6Output. dat. For each employee, the data must :firstNamelastName updatedSalary. Format the output of decimal numbers to two decimal places.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
1. which of the following statements are true about routers and routing on the internet. choose two answers. a. protocols ensure that a single path between two computers is established before sending packets over it. b. routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. a packet traveling between two computers on the internet may be rerouted many times along the way or even lost or "dropped". d. routers act independently and route packets as they see fit.
Answers: 2
You know the right answer?
Write programs for the following (VS17 Express)

- Consider the following program in whic...
Questions
question
Mathematics, 30.01.2021 01:40
question
History, 30.01.2021 01:40
question
Mathematics, 30.01.2021 01:40
Questions on the website: 13722363