while (y==1)
{
float discount,addcost;
pricetopay=calpricetopay(ty,pricetopay,addcost,discount);
cout<<endl;
cout<<endl;
cout<<"\t\t\tTOY TOY Shoppie"<<endl;
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
cout<<endl;
cout<<"Name of item:"<<ty.name<<endl;
cout<<"Price of item:"<<ty.price<<endl;
cout<<"Made in:"<<ty.madein<<endl;
cout<<"Manufactured Date:"<<ty.date.d<<"/"<<ty.date.m<<"/"<<ty.date.y<<endl;
cout<<"Price to be paid: "<<pricetopay<<endl;
cout<<"Do you want to proceed with another transaction?"<<endl;
cout<<"If yes, Please type '1'. If no, please press 2 to quit."<<endl;
cin>>y;
}
Above is the source code i typed...I cant find any errors in there...But the program is repeating infinitely....
I wonder is there anything to be changed ?