Friday, January 6, 2017

SUPER-MARKET BILLING SOFTWARE IN C++

// SUPER-MARKET BILLING SOFTWARE IN C++
#include<iostream>
using namespace std;

int main()

{  string item, item1,item2;
    float weight,weight1,weight2, totalcost, totalcost1, totalcost2,cost, cost1, cost2;

   cout<< "Enter the item 1 and press<Enter>:"<<endl;
   cin>>item;
  cout<< "Enter the weight of item 1 in kgs and press<Enter>:"<<endl;
  cin>> weight;
  cout<< "Enter the price/kg and press<Enter>:"<<endl;
  cin>>cost;

  cout<< "Enter the item 2 and press<Enter>:"<<endl;
   cin>> item1;
cout<< "Enter the weight of item 2 in kgs and press<Enter>:"<<endl;
cin>> weight1;
cout<< "Enter the price/kg  and press<Enter>:"<<endl;
    cin>> cost1;

cout<< "Enter the item 3 and press<Enter>C:"<<endl;
    cin>> item2;
cout<< "Enter the weight of item 3 in kgs and press<Enter>:"<<endl;
cin>> weight2;
cout<< "Enter the price/kg  and press<Enter>:"<<endl;
cin>>cost2;


   totalcost = weight*cost;
  totalcost1  = weight1*cost1;
  totalcost2 = weight2*cost2;

    cout<<"Welcome ! To Yashtosh Mart"<<endl<<endl;
    cout<<"You bought following items from us"<<endl<<endl;
    cout<<item<<"   "   <<weight  <<" kgs  "<<"  @ "<<cost<<" Rs/kg " <<"Costing  Rs" <<totalcost<<endl;
    cout<<item1<<"  "    <<weight1  <<"kgs  "<<"  @ "<<cost1<<" Rs/kg " <<"Costing  Rs"<<totalcost1<<endl;
    cout<<item2<<"  " <<   weight2<<"   kgs  "<<"  @ "<<cost2<<" Rs/kg " <<"Costing  Rs"<<totalcost2<<endl;
    cout<<"\nGrand Total :  Rs. "<<totalcost1+totalcost2+totalcost<<endl;
    cout<<"Thanks for shopping with us!"<<endl<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";

   return 0;
}

No comments:

Post a Comment

Sacred Thought

5 May 2024 Hari Om Verse 50-51, chapter two:  In this chapter two Shree krishna explains a simple way of living. Free from desires and void ...