Tuesday, January 10, 2017

SUPER-MARKET BILLING CONSOLE APPLICATION

 #include<iostream>
using namespace std;

int main()
{
int n=0; float T=0;
  cout<<"Welcome to Yashtosh Mart !\n"<<endl;
  cout<<"Type total number of items bought"<<endl;
  cin>>n;

    float t[n];
   string itemName[n]; float quantity[n]; float rate[n];
   for(int j=0;j<n;j++)
   {   string s; float k,r;
       cout<<"input Name of item "<<j+1<<" <SPACE> Quantity <SPACE> rate press<ENTER>"<<endl;
       cin>>s>>k>>r;
       itemName[j]=s;
       quantity[j]=k;
       rate[j]=r;
   }
  for(int i=0;i<n;i++)
  {cout<<itemName[i]<<" "<<quantity[i]<<" "<<rate[i]<<" "<<"costing Rs."<<quantity[i]*rate[i]<<endl;
      t[i]=quantity[i]*rate[i];

     T= T+t[i];
   //cout<<"Your Grand Total = Rs."<<t<<endl;
  }
  cout<<"Your Grand Total = Rs."<<T<<endl;
    return 0;
}

No comments:

Post a Comment

Henry's law constant for CO 2 ​ in water is 1.67×10 ∘ Pa at 298 K . Calculate the quantity of CO 2 ​ in 500 mL , of soda water when packed under 2.5 atm CO 2 ​ pressure at 298 K .

  Explanation To calculate the amount of CO 2 ​ dissolved, we use Henry's Law: P = k H ​ × x _ C O 2 ​ where:\ P = partial pressure of...