Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a new C++ empty project titled \"CS115_IP2_YourName\" in the IDE. Determi

ID: 3781612 • Letter: C

Question

Create a new C++ empty project titled "CS115_IP2_YourName" in the IDE. Determine the functions that you need to create (you need at least 3). Design and implement those functions in the IDE. Your program should provide the following additional functionality (in addition to the functionality provided in Week1): Ask customers to select multiple products and quantities Print the order summary, including the products, the quantities, and the total price for each product Calculate and print the total price for the order. I need it in the language English and I'm using dev c

Explanation / Answer

#include <iostream>
using namespace std;

int main() {
int n,a=0,=0,=0,d=0,e=0,i=0;
int totalEgg=0,totalMilk=0,totalSugar=0;
   std::cout << "WELCOME" << std::endl;
   std::cout << "PRESS 1 FOR EGG" << std::endl;
   std::cout << "PRESS 2 FOR MILK" << std::endl;
   std::cout << "PRESS 3 FOR SUGAR" << std::endl;
   std::cout << "PRESS 4 FOR EXIT" << std::endl;
   for(int j=1;j<=4;j++){
   std::cout << "now enter your choice..." << std::endl;
       std::cin >> n;
   switch(n){
   case 1:
   std::cout << Value of 1 EGG IS 2$... << std::endl;
   std::cout << ENTER QUANTITY OF EGG YOU WANT? << std::endl;
   std::cin >> a;
   totalEgg=a*2;
   break;
   case 2:
   std::cout << value of 1 ltr milk is 4$... << std::endl;
   std::cout << ENTER QUANITY OF MILK YOU WANT? << std::endl;
   std::cin >> b;
   totalMilk=b*4;
   break;
   case 3:
   std::cout << value of 1 KG sugar is 5$... << std::endl;
   std::cout << "ENTER THE QUANITY OF SUGAR YOU WANT?" << std::endl;
   std::cin >> c;
totalSugar=c*5;  
break;
case 4:
std::cout << "Thnaks for shopping...." << std::endl;
break;
   }
   std::cout << "want to shop more? if yes press 9 else 0" << std::endl;
   std::cin >> e;
   if(e==9){
   i=1;
   }
   else{
   i=10;
   }
   }
   std::cout << "your bill summery..." << std::endl;
   printf("No of Egg",a);
   printf("no of ltr milk",b);
   printf("No KG SUGAR",c);
   int total=totalSugar+totalMilk+totalEgg;
   std::cout << "totalbill" << std::endl;
   std::cout << total << std::endl;
  
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote