Fairly new to programming here. I can't get my default code in the switch statement to work. I want it to display an error and exit as soon as any data input that's not in the range is entered. For some reason, it goes to the next cout line after the switch statement.
#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;
int main()
{
char choice;
const double P=8.00, A=10.50, B=12.50;
double t,w,price;
cout<<"\nPlease enter the state code: "; …Run Code Online (Sandbox Code Playgroud)