I have an infinite loop. I have the program reading the input as an ascii value and i need it to keep track of upper and lower cases and also numeric characters.
int main(){
char ascii;
int numbercount, uppercasecount, lowercasecount;
numbercount = 0, uppercasecount = 0, lowercasecount = 0;
do
{
cout<< "enter # to quit!"<< endl;
cout << "Give character: ";
cin >> ascii;
do
cout << "Its ascii value is: " << (int) ascii << endl;
while (ascii!=35);if (ascii>=65 && ascii<=90)
uppercasecount++;
elseif (ascii>=48 && ascii<=57)
numbercount++;
elseif (ascii>=97 && ascii<=122)
lowercasecount++;
} while( ascii != 35 );
cout << "number of lowercases: "<<lowercasecount;
*edit on a side note you might want to use a while statement instead of a do/while actually because do whiles check at the end. Otherwise just throw an if statement in and end it if they put '#';