"grocery shopping list c++ chegg" Code Answer's

You're definitely familiar with the best coding language C++ that developers use to develop their projects and they get all their queries like "grocery shopping list c++ chegg" answered properly. Developers are finding an appropriate answer about grocery shopping list c++ chegg related to the C++ coding language. By visiting this online portal developers get answers concerning C++ codes question like grocery shopping list c++ chegg. Enter your desired code related query in the search bar and get every piece of information about C++ code related question on grocery shopping list c++ chegg. 

grocery shopping list c++ chegg

By Excited EchidnaExcited Echidna on Oct 11, 2020
// CPP code is Paste here and File cannot be uploaded
//Purpose of Program is to add item of grocery list and add tip and checking Shipping cost
#include <iostream>
using namespace std;
int main()
{
int item=0;
float Milk=5.99;
float Egg = 6.99;
float Cheese = 10.98;
float Pasta = 2.75;
 
float cost=0.00;// take the starting cost 0
int count=0 ;//count of items
int tip=0;
float valueoftip=5.00;// value of the tip
float totalcost=0.00;
   cout<<"GROCERY SHOPPING ITEMS"<<endl;
   cout<<"1. Milk : $ 5.99 / gallon"<<endl;
   cout<<"2. Egg : $ 6.99 / dozen"<<endl;
   cout<<"3. Cheese : $10.98 /oz"<<endl;
   cout<<"4. Pasta : $2.75 /Packet"<<endl;
  
   // Asking Customer For The Items
   cout<<"Choose Your Item : "<<endl;
   cin>> item;
  
   switch (item) {
case 1:
cout << "Milk"<<endl;
cost=cost+Milk;
break;
case 2:
cout << "Egg"<<endl;
cost=cost+Egg;
break;
case 3:
cout << "Cheese"<<endl;
cost=cost+Cheese;
   break;
case 4:
cout << "Pasta"<<endl;
cost=cost+Pasta;
   break;
 
}
//asking customer quantity of item
cout<<"Quantity of Item :"<<endl;
cin>>count;
 
cout<<"Cost is : ";
cost=cost*count;
cout<<cost<<endl;
//Asking User To Add Tip
cout<<"Do you Want to Add $5 Tip Press 1 for yes or 2 for no"<<endl;
cin>>tip;
switch(tip)
{
   case 1:
   	cost=cost+valueoftip;
cout<<cost<<endl;
   	break;
case 2:
   cost=cost;
   cout<<cost<<endl;
   break;
}
// Checking if the shipping is free or not
//if cost is more than 20.00 than cost of shipping is added in the totalcost variable
if(cost<=20.00)
{
   cout<<"Your Shipping is Free"<<endl;
   totalcost = cost;
   cout<<"Total Cost is : "<<totalcost<<endl;
  
}
else if(20.00<cost<=35.00)
{
cout<<"Your Shipping cost is $ 4.35"<<endl;
   totalcost = cost+4.35;
   cout<<"Total Cost is : "<<totalcost<<endl;
      
}
else
{
cout<<"Your Shipping cost is $ 7.65"<<endl;
totalcost = cost+7.65;
cout<<"Total Cost is : "<<totalcost<<endl;
  
}
   return 0;
}

Add Comment

1

All those coders who are working on the C++ based application and are stuck on grocery shopping list c++ chegg can get a collection of related answers to their query. Programmers need to enter their query on grocery shopping list c++ chegg related to C++ code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about grocery shopping list c++ chegg for the programmers working on C++ code while coding their module. Coders are also allowed to rectify already present answers of grocery shopping list c++ chegg while working on the C++ language code. Developers can add up suggestions if they deem fit any other answer relating to "grocery shopping list c++ chegg". Visit this developer's friendly online web community, CodeProZone, and get your queries like grocery shopping list c++ chegg resolved professionally and stay updated to the latest C++ updates. 

C++ answers related to "grocery shopping list c++ chegg"

View All C++ queries

C++ queries related to "grocery shopping list c++ chegg"

grocery shopping list c++ chegg Pretty Print c++ chegg list conda environments how to print list in c++ c++ remove multiple items from list c++ linked list clear delete a head node in link list how to make a list in c++ traverse through list c++ cpp std list example how to get an element in a list c++ cpp linked list list in cpp linked list insertion in c++ member initializer list in c++ initialization list c++ how to write C++ list c++ append to list c++ class member initializer list c++ remove item from list c++ com port list circular queue using linked list in c++ linked list in c++ stl list in c++ stl c++ iterate through constant list list clear c++ list of products on e commerce websites c++ list pop back infix to prefix using cpp linked list program Given the following declarations below. Write a loop to read a list of numbers from the keyboard terminated by -999 and store the even numbers (skip over the odd numbers) in the vector v. clean list widget qt linked list in c++ using class insert delete display in array error: invalid use of template-name without an argument list qt widget list set selected c++ initialization list C++ drop last element of list c++ argument list for class template is missing menu driven program to delete in linked list attack on titan junior high list of episodes initializer list c++ linked list operations list stl linked list class c++ basic implementation print circular linked list c++ conda list environments how to show list of conda packages reverse a linked list linked list adjacency list representation of graph how to reverse a linked list reverse linked list c++ list add

Browse Other Code Languages

CodeProZone