//Lesson 3 (Homework 2)
#include
using namespace std;
int main()
{
int choice = 0;
cout<<"Enter a letter from A to D: "; cin>>choice;
cout<
if(choice>='E')
{
cout<<"You've enter an invaild letter"<
cout<
return 0;
}
if(choice == 'A')
{
cout<<"You've entered letter A"<
cout<<"A for Apple"<
cout<
return 0;
}
if(choice == 'B')
{
cout<<"You've entered letter B"<
cout<<"B for Boy"<
cout<
return 0;
}
if(choice == 'C')
{
cout<<"You've entered letter C"<
cout<<"C for Cat"<
cout<
return 0;
}
if(choice == 'D')
{
cout<<"You've entered letter D"<
cout<<"D for Dog"<
cout<
return 0;
}
cout<<"You did not enter a letter";
cout<
return 0;
}
2007-01-18
17:21:34
·
5 answers
·
asked by
capphire
2
in
Computers & Internet
➔ Programming & Design