Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 6 points ) Write a C + + program named hw 1 _ 1 . cpp that reads two integer numbers from a user
points Write a C program named hwcpp that reads two integer numbers from a user and displays the sum, average, and product. The following shows a sample execution of the program. When the instructor runs your program for grading, your program should display the same result as the sample execution, including spaces. Note that the boldfaced numbers and in this case are entered by the user. Thus, you could also enter and should return appropriate results.
Enter two integers:
You entered and
points Suppose a worker who works for a company has received a pay increase next year. Write a program named hwcpp that takes the worker's current annual salary as input, and outputs the amount of salary increase, the new annual salary, and the new monthly salary. Note that when you display the output, you have to display the money amount correctly ie two digits after the decimal point The output should look as follows:
Enter your current salary
Salary increase: $
New annual salary: $
New monthly salary: $
If you want to print out two decimal places, you can use these three lines of code before printing out monetary values:
cout. setfios: : fixed;
cout. setfios: : showpoint;
cout.precision;
points Write a C program named hwcpp that allows the user to enter a number of cents. Then the program outputs the value in terms of quarters, dimes, nickels, and pennies. The output should look as follows. Again, when the instructor runs your program for grading, your program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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