I am working on this assignment and I have half of it completed, I am struggling with writing code and plan to get some help with it but if someone could help me with what is due tomorrow that would be great!
You combine phase 1 and phase 2 in the same program, and you will only have one int main(). After the inputs and calculations are done for Phase 1, your program will move immediately to phase 2 by printing “*** Coupons ***” and then asking for input. YOUR PROGRAM MUST COMPILE as is. If you have two int main() functions, your program will not compile and you will get a 0 for the lab.
Overview: Write a program that computes the amount of your next purchase, then computes the final purchase amount given each coupon, and finally prints which coupon provides the better benefit. Inputs: Your program will take the following inputs:
1. The amount of the two coupons (i.e., the percentage amount of coupon 1 and the dollar amount of coupon 2) as doubles.
2. The quantity and price for three separate items. For each item you will enter a quantity as an integer and a price as a double.
3. The sales tax percentage as a double.
Outputs: 1. The total amount of the purchase 2. The amount of the purchase with coupon 1 3. The amount of the purchase with coupon 2 4. The coupon that provides the better benefit.
a. If both coupons have the same benefit, output “Both coupons have the same benefit”
You will need to calculate the total of all items and then subtract the coupon’s benefit. After that is completed, you will need to add the sales tax to get the final result. Here’s a sample interaction with the program for Phase 2 (user input in blue):
*** Coupons ***
Please enter a percentage amount for coupon 1: 5.5 Please enter a dollar amount for coupon 2: 15 Please enter the quantity and price for your first item: 8 2.25 Please enter the quantity and price for your second item: 10 1.25 Please enter the quantity and price for your third item: 15 19.99 Please enter the sales tax as a percentage: 6.5
Total before coupon = 351.82 Total with coupon 1 = 332.47 Total with coupon 2 = 335.85 Use coupon 1
this is what I have thus far:
#include <iostream>
using namespace std;
int main( )
{
int month, day, year;
int adjustment, adjustedMonth, adjustedYear, dayOfWeek;
cout << "***Homework***/n" << endl;
cout << "Please enter a date (month day year) : " ;
cin>> month >> day >> year;
The code to figure out what day of the week it was doesn't seem relevant to the question you posted.
I want to help you, but if this is really all you have, then you're not even making an attempt at this. All you did was literally output coupons.
We're more than willing to help you here, but we wont flat out do your homework for you. Make an actual attempt and when you get stuck, post again and i'll help you out.