#include<iostream>
using namespace std;
int getNumberOffences(){
int n;
cout<<"\nEnter the number of offences committed by the driver\n";
cin>>n;
return n;
}
int main(){
string offence_type;
double charge;
cout<<"Enter the type of offence\n";
cin>>offence_type;
if(offence_type == "minor"){
charge = charge + 50;
int n = getNumberOffences();
if(n == 2){
charge = charge + 150;
cout<<"The driver is bared from driving for 2 weeks\n";
}
else if(n>2){
cout<<"The driver license must be consficated and the driver must go for the retraining\n";
}
cout<<"The charge is GHs "<<charge;
}
else if(offence_type == "major"){
cout<<"The driver is investigated by the DVLA\n";
}
}
Comments
Leave a comment