lies between A and F it should display the first name of the person or if the first letter of the first name lies betwen P and Q , it should displays the message"finne".Otherwise the program bort with the word "good".Program shold end when you enter a integer.
Write C++ program that uses a switch statement such that if the first letter of the first name that is entere
switch(first_name[0])
{
case 'A' :
case 'a' :
case 'B' :
case 'c' :
.
.
.
case 'F' :
case 'f' : printf("%s", first_name); break;
case 'P' :
case 'p' :
case 'q' :
case 'Q' : printf("Fine");
case '1' :
case '2' :
case '3' :
case '4' :
case '5' :
case '6' :
case '7' :
case '8' :
case '9' :
case '0' : return 0;
default : printf("Good"); break;
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment