ChaseWeek1 CS192 Assignment.cpp

ChaseWeek1 CS192 Assignment.cpp - cout<<"The price...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <string> using namespace std; int main() { string raptor_prompt_variable_zzyz; ?? new_count; ?? user_input; ?? count; ?? total_price; ?? tax; ?? subtotal; ??[] item_name = new ??[??+1]; ??[] item_price = new ??[??+1]; count =0; subtotal =0; while (1) { count =count+1; raptor_prompt_variable_zzyz ="Enter the item name"; cout << raptor_prompt_variable_zzyz << endl; cin >> item_name(count); raptor_prompt_variable_zzyz ="Enter the item's price"; cout << raptor_prompt_variable_zzyz << endl; cin >> item_price(count); subtotal =subtotal+item_price(count); raptor_prompt_variable_zzyz ="Have you finished entering the purchased items?"; cout << raptor_prompt_variable_zzyz << endl; cin >> user_input; if (user_input=="yes")) break; if (count>=5) { tax =0.06*subtotal; total_price =subtotal+tax; new_count =count; count =1; while (1)
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { cout << "The price of "+item_name(count)+" is: $"+item_price(count) << endl; count =count+1; new_count =new_count-1; if (new_count<=0)) break; } cout << "The subtotal of purchase is: $"+subtotal << endl; cout << "The tax on the purchase is: $"+tax << endl; cout << "The total price of the purchased items is: $"+total_price << endl; } else { } } tax =0.06*subtotal; total_price =subtotal+tax; new_count =count; count =1; while (1) { cout << "The price of "+item_name(count)+" is: $"+item_price(count) << endl; count =count+1; new_count =new_count-1; if (new_count<=0)) break; } cout << "The subtotal of purchase is: $"+subtotal << endl; cout << "The tax on the purchase is: $"+tax << endl; cout << "The total price of the purchased items is: $"+total_price << endl; return 0; }...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern