draw algritm for this cod. #include #include using namespace std; int main(){ //for prointing welcome message cout<<"------------------------------"<>customer_name; cout<<"Car plate number :"; cin>>car_plate_number; cout<<"Are you membership (y/n): "; cin>>membership; cout<<"Details services charges are as follow:"<>choice_service; cout<<"\n Service need :";switch(choice_service) { case 1: { cout<<"Basic Tuning = 50 OMR"<
I need draw algritm for this cod.
#include<iostream>
#include <string>
using namespace std;
int main(){
//for prointing welcome message
cout<<"------------------------------"<<endl;
cout<<" Welcome to Muscat Auto Workshop"<<endl;
cout<<"---------------------------------"<<endl;
cout<<"*Please provide your name & car plate number & membership status(Y/N) *"<<endl;
string customer_name,car_plate_number;
int choice_service,discount;
char membership;
double total;
cout<<"Customers` Name :";
cin>>customer_name;
cout<<"Car plate number :";
cin>>car_plate_number;
cout<<"Are you membership (y/n): ";
cin>>membership;
cout<<"Details services charges are as follow:"<<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;
cout<<"Enter th name of service you need (1 / 2 / 3 / 4):"<<endl;
cin>>choice_service;
cout<<"\n Service need :";switch(choice_service)
{
case 1:
{
cout<<"Basic Tuning = 50 OMR"<<endl;
switch(membership)
case 'y':
discount=50*0.1;
cout<<"Membership discount = "<<discount<<endl;
total=50-discount;
cout<<"Total fee = "<<total<<endl;
break;
switch (membership)
case 'n' :
cout<<"total fee = 50 OMR";
{
case 2:
cout<<"Software Re-installation = 60 OMR"<<endl;
switch(membership)
case 'y':
discount=60*0.1;
cout<<"Membership discount = "<<discount<<endl;
total=60-discount;
cout<<"Total fee = "<<total<<endl;
break;
switch(membership)
case 'n' :
cout<<"total fee = 60 OMR";{ case 3:
cout<<"Parts Replacement = 100 OMR"<<endl;
switch(membership)
case 'y':
discount=100*0.1;
cout<<"Membership discount = "<<discount<<endl;
total=100-discount;
cout<<"Total fee = "<<total<<endl;
break;
switch(membership)
case 'n' :
cout<<"total fee = 100 OMR";}
{
case 4:
cout<<"Body Paint: = 120 OMR"<<endl;
switch(membership)
case 'y':
discount=120*0.1;
cout<<"Membership discount = "<<discount<<endl;
total=120-discount;
cout<<"Total fee = "<<total<<endl;
break;
switch(membership)
case 'n' :
cout<<"total fee = 120 OMR";
}
}
}
}
}
Step by step
Solved in 2 steps