Please change this program to #include #include #include using namespace std; int main() { char V,x; int charges; cout<<"Select your vehicle:\nC\t=Car\nB\t=Bus\nT\t=Truck"; cin>>V; cout<<"Enter days to park the vehicle : "; cin>>x; switch(V) { case 'C': { charges=x*20; cout<<"Charges for Car is Rs."<
Please change this program to #include<stdio.h>
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
char V,x;
int charges;
cout<<"Select your vehicle:\nC\t=Car\nB\t=Bus\nT\t=Truck";
cin>>V;
cout<<"Enter days to park the vehicle : ";
cin>>x;
switch(V)
{
case 'C':
{
charges=x*20;
cout<<"Charges for Car is Rs."<<charges ;
break;
}
case 'B':
{
charges=x*25;
cout<<"Charges for Car is Rs."<<charges;
break;
}
case 'T':
{
charges=x*30;
cout<<"Charges for Bus is Rs."<<charges;
break;
}
default:
cout<<"Invalid input";
}
return 0;
}
Step by step
Solved in 2 steps with 2 images