I dont know whats wrong with my code..
when i entered the value,there was nothing appeared on my screen..
I've tried put the single quote like this one :
case '1' :
cout<<Very Acidic;
break;
..but it was only works for the acidic value..When i entered the value more than 7,it will display the "very acidic" statement and not the value that it supposed to display..
Thank you :)
#include <iostream>
using namespace std;
int main () {
char ph;
cout<<"Enter the ph value";
cin>>ph;
cout<<endl;
switch (ph) {
case 1 :
cout<<"Very Acidic";
break;
case 2 :
cout<<"Acidic";
break;
case 3 :
cout<<"Acidic";
break;
case 4 :
cout<<"Acidic";
break;
case 5 :
cout<<"Acidic";
break;
case 6 :
cout<<"Acidic";
break;
case 7 :
cout<<"neutral";
break;
case 8:
cout<<"Alkaline";
break;
case 9:
cout<<"Alkaline";
break;
case 10:
cout<<"Alkaline";
break;
case 11:
cout<<"Alkaline";
break;
case 12:
cout<<"Alkaline";
break;
case 14:
cout<<"Alkaline";
break;
default : cout<<"wrong input ";
cin.get()
}