Program that calculates how much a person earns in a month

Assignment Help C/C++ Programming
Reference no: EM13166853

Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day, and so on with the daily pay doubling each day the employee works. The program should ask the user for the number of days the employee worked during the month and should display a table showing how much the salary was for each day worked, as well as the total pay earned for the month. The output should be displayed in dollars with two decimal points, not in pennies.

Input Validation: Do not accept a number less than 1 or more than 31 for the number of days worked.
 

Reference no: EM13166853

Questions Cloud

Calculate the electrode potential : Calculate the electrode potential of the following half cell if it was at standard conditions. Then recalculate how this changes using.
How much heat must be provided to vaporize : Liquid butane, C4H10, is stored in cylinders to be used as a fuel. Suppose 30.4 g of butane gas is removed from a cylinder. How much heat must be provided to vaporize this much gas? The heat of vaporization of butane is 21.3 kJ/mol.
How much heat is evolved per mole of gas formed : When 1 gram of nitroglycern, C3H5(NO3)3, decomposes to form nitrogen gas, oxygen gas, gaseous carbon dioxide, and liquid water, 1.9 kcal of heat is evolved. How much heat is evolved per mole of gas formed in the decomposition of nitroglycerine?
Find the number of automobiles : The mass of an average blueberry is 0.76g and the mass of an automobile is kg. Find the number of automobiles whose total mass is the same as 1.0mol blueberries.
Program that calculates how much a person earns in a month : Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day,
Calculate the number of grams of alcohol present : Calculate the number of grams of alcohol present in 1.00 L of 60. proof gin. The density of ethanol is 0.798 g/mL.
What is the mass of the liquid : If 12.5 g of CCl3F is enclosed in a 1.1 -,L container, will any liquid be present? What is the mass of the liquid?
How many grams of asprin were lost in the washing process : how many grams of asprin were lost in the washing process you used to purify your product, assuming you used 50mL if water for washing? The solubility of asprin in water is 0.33g per 100mL at room temperature.
Determine the empirical formula of greenockite : the mineral greenockite is a rare yellow sulfide of cadmium that is 78.0% cadmium and 22.0% sulfur by mass. Determine the empirical formula of greenockite.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Draw a two-dimensional house seen from the front

Draw a two-dimensional house seen from the front, the way a child would: with a door, two windows, and a roof with a chimney. Feel free to add details; mabe have "smoke" come out of the chimney.

  Create a 1-dimensional (1d) array

Write a program to create a 1-dimensional (1D) array that contains 15 characters and display to the screen a count of the occurrences of each of the vowels a, e, i, o, and u in the array.

  Optimization is to add a sorting algorithm

The second optimization is to add a sorting algorithm. Each time you add an item to the array (from disk or from keyboard), you call a function called SortMyArray(), which use the bubble sorting algorithm to sort the array in the ascending order, ..

  Write program which inputs number of winning coupons

Write a program which inputs number of coupons you win and outputs how many candy bars and gumballs you can get if you spend all off your coupons on candy bars first and remaining coupons on gumballs in c++.

  Program which calculates the average and sum of the numbers

write down a program which calculates the average and sum of the numbers enter by a user.Using a While Loop

  . write a segment of code that prints the number of elements

Assuming the array x has been defined as: int x[n]; for some n and that values have been assigned to all the elements. Write a segment of code that prints the number of elements between (but not including) the largest and smallest values in the array..

  Program to generate a star-based histogram for a quiz

Write a C++ program to generate a star-based histogram for a quiz (maximum score possible is 5) given to a class of N students, where N is an input from the user. Use arrays for computation.

  Calculate the component voltages

Calculate the component voltages for the following series resonant RLC circuit

  Demonstrate the construction and output of an array

In fluid mechanics, the Reynolds number (Re) is a dimensionless quantity that is used to help predict similar flow patterns in different fluid flow situations. For example, Reynolds numbers can be computed for different velocities of fluid flow over ..

  Design customized mailing lists for marketing department

Marketing department requires to be able to design customized mailing lists, to send different messages to different types of donors. What system will best meet these requirements?

  Test a program that prompts for the user

Write and test a program that prompts for the user to input a file name and uses two functions head() and tail() - head() displays the first 10 lines of a file

  C program that compare the time required

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd