#include using namespace std; int main() { string c_name ; string car_n; int n, member_n , total ,d; char choice; cout<< "Muscat Auto Workshop"<>c_name; cout<<" Enter car plate number : ";cin>>car_n; cout<<" choice the required service "<>n; if(n==1) { cout<<" charges before discout = 50 OMR "<>choice; if ( choice =='Y') { d= n*0.1; total=n - d; cout <<" Enter membership number : "; cin>>member_n; cout << " Total charges after discount = "<
#include using namespace std; int main() { string c_name ; string car_n; int n, member_n , total ,d; char choice; cout<< "Muscat Auto Workshop"<>c_name; cout<<" Enter car plate number : ";cin>>car_n; cout<<" choice the required service "<>n; if(n==1) { cout<<" charges before discout = 50 OMR "<>choice; if ( choice =='Y') { d= n*0.1; total=n - d; cout <<" Enter membership number : "; cin>>member_n; cout << " Total charges after discount = "<
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
#include <iostream>
using namespace std;
int main()
{
string c_name ;
string car_n;
int n, member_n , total ,d;
char choice;
cout<< "Muscat Auto Workshop"<<endl<<endl;
cout<< "Enter customer name : ";cin>>c_name;
cout<<" Enter car plate number : ";cin>>car_n;
cout<<" choice the required service "<<endl;
cout<<" 1-Basic Tuning : 50 OMR "<<endl;
cout<<" 2-Software Re-installation : 60 OMR "<<endl;
cout<<" 3-Parts Replacement : 100 OMR"<<endl;
cout<<" 4-Body Paint : 120 OMR"<<endl;
cin>>n;
if(n==1)
{
cout<<" charges before discout = 50 OMR "<<endl;
} else if ( n==2)
{
cout <<" charges before discount = 60 OMR "<<endl;
}else if (n==3)
{
cout<<" charges before discount = 100 OMR "<<endl;
}else if (n==4 )
{
cout<<" charges before discount = 120 OMR"<<endl;
}
cout<<" Do you have a memebership number Y/N ?"<<endl;
cin >>choice;
if ( choice =='Y')
{
d= n*0.1;
total=n - d;
cout <<" Enter membership number : "; cin>>member_n;
cout << " Total charges after discount = "<<total<<endl;
}
else
{
cout<<" the total charges after discount = "<<n<<endl;
}
}
what is the mistake in this code?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY