I'm practicing switch statements in C++, and I was wondering if I could add a Boolean expression and how, like it's an if/else counterpart. Is it possible to incorporate this?
Here's my skeleton code:
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <Windows.h>
#include <stdlib.h>
#include <time.h>
#include <random>
using namespace std;
int main()
{
int HouseValue;
cout << "Enter your total house value estimate:";
cin >> HouseValue;
switch (HouseValue)
{
case 1:
(HouseValue < 100000 && HouseValue > 50000);
cout << "";
break;
case 2:
(HouseValue < 250000 && HouseValue > 100000);
cout << "";
break;
case 3:
(HouseValue < 500000 && HouseValue > 250000);
cout << "";
break;
case 4:
(HouseValue < 1000000 && HouseValue > 500000);
cout << "";
break;
case 5:
(HouseValue < 3000000 && HouseValue > 1000000);
cout << "";
break;
}
return 0;
}