C++ Identifiers and Output.

User Generated

aqnjt87

Programming

Description

There are 5 very small assignments in the pdf that require basic knowledge of C++. Sum of 2 numbers. Revenue Predictions and 3 others. I need each of these sections completed in separate files.

Unformatted Attachment Preview

LAB – Identifiers and Output a) Sum of two numbers: Write a program that stores the integers 234 and 516 in variables, and stores the sum of these two in a variable named result. Display your output in equation form. b) Revenue Prediction: The Online Retail division of Amazon generates 73% of total sales for the company. Based on that percentage, write a program that will predict how much revenue the retail division will generate if the Amazon reports $340.5 million in revenue for the year. Display your output in the format below: Amazon’s Total Revenue: $[totalRevenue]M Online Retail % of Total Revenue: [percentOfTotalRevenue]% Online Retail’s Revenue: $[onlineRetailRevenue]M c) Sales Tax: Write a program that will compute the total sales tax on a purchase of $179.89. Assume the state sales tax is 8% and the county sales tax is 3%. Display your output in the format below: Purchase Price: State Tax %: State Tax Amount: County Tax %: County Tax Amount: Total Tax Owed: $[purchasePrice] [state_tax_percent]% $[stateTaxAmt] [county_tax_percent]% $[countyTaxAmt] $[totalTax] Identifiers and Output d) Restaurant Bill: Write a program that computes the tax and tip on a restaurant bill for a patron with a $159.81 meal charge. The tax should %8 of the meal cost. The tip should be 20% of the total after adding the tax. Display your output in the format below: ================================================================ Meal Receipt ================================================================ Meal Cost: Tax Amount: Tip Amount: Total Bill: $[mealCost] $[taxAmt] $[tipAmt] $[totalBill] ================================================================ e) Average of Values: Write a program that stores the following values in five different variables, 34, 61.5, 91.8, 73, and 102. It also stores the value 5 in a constant named TOTAL_NUM_VALUES. The program should first calculate the sum of the five variables and store the result in a variable named sum. Then the program should divide the sum variable by the TOTAL_NUM_VALUES constant to get the average. Store the average in a variable named avg. Display your output in the format below: The sum of the five numbers is: [sum] The average of the five numbers is: [avg] Identifiers and Output f) Annual Pay: Suppose an employee gets paid every two weeks and earns $2580.00 each pay period. In a year the employee gets paid 26 times. Write a program that defines the following variables: payAmount – This variable will hold the amount of pay the employee earns each pay period. payPeriods – This variable will hold the number of pay periods in a year. annualPay – This variable will hold the employee’s total annual pay, which will be calculated. The program should calculate the employee’s total annual pay by multiplying the employee’s pay amount by the number of pay periods in a year, and store the result in the annual pay variable. Display your output in the format below: ================================================================ Employee’s Annual Paystub ================================================================ Amount Earned per Pay Period: $[payAmount] Total Number of Pay Periods: [payPeriods] Employee’s Annual Pay: $[annualPay] ================================================================ Identifiers and Output
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Actually, I finished. Pl...


Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags