1. User will enter the ISBN,
The system will trace the title and price of the book automatically.
The system should check whether the book is in the stock or not.
If it is not, please let the user to enter again.
2. Allow a customer to buy more than one item from the bookshop.
3. Calculate and print the bill.
The billing amount should include 5% tax.
Sample Output:
Welcome to JackâBookShop
Please enter the ISBN: 1234
The title is Introduction to Java Programming
The Price is RM 99.50
Do you wish to continue? y/n
y
Please enter the ISBN: 5678
The title is C++ How to Program
The Price is RM 79.40
Do you wish to continue? y/n
n
Your Receipt:
1234 RM 99.50
5678 RM 79.40
Total RM 178.90
Tax RM 8.95
Total RM 187.85
Thank You!!!
Please Come Again!!!
Source Code..which i have do some..anyone can add or modify it??
and correct the mistakes if possible..
Help :cry: i cant solve it... :cry:
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
int main()
{
double ISDN ;
char title;
float price;
int continues;
char ans;
cout<<"---Welcome To Billy's Bookshop---\n";
cout<<"Please enter the ISDN: ";
cin>>ISDN;
if (ISDN==1234)
{
cout<<"The Title is Introduction to Java Programming"<<endl<<"The Price is RM 99.50"<<endl;
}
if (ISDN==5678)
{
cout<<"The Title is C++ How to Program"<<endl<<"The Price is RM 79.40"<<endl;
}
else
{
cout<<"Not Valid"<<endl;
}
do
{
cout<< "Do you want to continue (Y/N)?\n";
cout<< "You must type a 'Y' or an 'N'.\n";
cin >> ans;
}
while((ans !='Y')&&(ans !='N')&&(ans !='y')&&(ans !='n'));
return 0;
}