Hello, Beginner in C++
how to make this program if i pressed ctrl-c the program will quit.
and there's a tiny problem. whenever i run my program it says that return 0 is unreachable code. thanks guys :)
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
while (1)
{
cout <<"Enter a character (ctrl-c to quit): ";
char input;
cin >>input;
cout <<input <<" is a ";
if (input >= 'a' && input <= 'z')
cout << "letter" <<endl;
else
cout << "number" <<endl;
}
return 0;
}