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

  Implement a graphics system that has classes

Implement a graphics System that has classes for various figures: rectangles, squares, triangles and circles. A rectangle has data members height, width, color , and center point. A square has center point and an edge and color

  Complete the payroll program with following driver object

complete the payroll program with the following driver objects.

  Write a program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month.

  Write a function that will take in an array of integers

Write a function that will take in an array of integers, sum up all the values in the array, and return the result to the calling function.

  Method celsius return celsius equivalent of fahrenheit

Method Celsius return the Celsius equivalent of a Fahrenheit temperature,using the calculation Celsius = 5.0/9.0*(Fahrenheit -32); method Fahrenheit returns the Fahrenheit equivalent of a Celsius temperature, using the calculation  Fahrenheit = 9.0/5..

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  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, ..

  Dealerships are awarded the rebate

Dealerships are awarded the rebate on a quarter-by-quarter basis, only for quarters where their actual sales exceeded expected volumes for that quarter. Expected sales volumes for each quarter are as follows:

  Program to calculate word ladders where single-character

Write down a program in C++ to calculate word ladders where single-character substitutions have the cost of 1, and single-character additions or deletions.

  Build a definition for a class that stores data

Using C++ language, build a definition for a class that stores data about a two dimensional vector. The class has to have mutators and accessors to get and set the x and y values. Make x and y integers. Then overload the operator * so that it retu..

  Write c program that prompts for variable number of integers

Write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out the average.

  Create a c++ console application

Objective: Create a C++ console application that will model the characteristics of a resistor. Create a multifile project. Create and add to the project an h file containing the resistor-class definition. Create and add to the project a cpp file cont..

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