home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
tybc4
/
if4.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-19
|
425b
|
19 lines
// Program demonstrates the nested if statements
#include <iostream.h>
main()
{
char c;
cout << "Enter a character : ";
cin >> c;
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))
if (c >= 'A' && c <= 'Z')
cout << "You entered an uppercase letter\n";
else
cout << "You entered a lowercase letter\n";
else
cout << "You entered a non-letter character\n";
return 0;
}