2018 Google camp rating files ~

Source: Internet
Author: User
Description

The switch statement is required. If only the if statement is submitted successfully, the score is zero.

Amen……> <In fact, switch is very helpful ~

LCL liked Harry Potter very much. Google camp held a 3D modeling competition at the end of last semester. At the end of the award, some titles were needed for evaluation, therefore, LCL wants to know what the corresponding rules in HP are, so she handed this question to you ~~~ (Why does she always give you these messy questions? =)

After a variety of searches in Google, you have found the corresponding rules for rating:

"Scoring mark -- scoring title o -- outstanding e -- exceeds expectations a -- acceptable p -- poor d -- dreadful" now we need to provide an award statistics for contestants in the 3D modeling competition, enter the score mark of the contestants and output the corresponding score title according to the sample requirements. If any of the score marks that do not belong to the above items appears, the "sorry, your prize doesn't exist."

Input

The input includes the T group data. The first row contains a positive integer T (0 <t <= 200), indicating that the T group data will be read next. 2nd ~ T + 1 line: contains a single character C, indicating the score mark of the contestant. (C is an uppercase English letter)

Output

Output a row of data in each group. If the score mark exists, output "your prize is '(corresponding score title )'!", For P or D, output "your prize is '(corresponding score title )'... ", if the score mark does not exist, the output is" sorry, your prize doesn't exist. the output is subject to the sample.

Sample Input
4
P
r

I
sample output
your prize is 'poor '...
sorry, your prize doesn't exist.
your prize is 'accesstable '!

sorry, your prize doesn't exist.

the nested if else is used here.

 # include 
     
       int main () {int number, T; char a [3]; scanf ("% d", & number); For (t = 1; t <= number; t ++) {scanf ("% s", a); if (a [0] = 'P') {printf ("your prize is 'poor '... \ n ");} else if (a [0] = 'O') {printf (" your prize is 'outstanding '! \ N ");} else if (a [0] = 'A') {printf (" your prize is 'accesstable '! \ N ");} else if (a [0] = 'D') {printf (" your prize is 'dreadful '... \ n ");} else if (a [0] = 'E') {printf (" your prize is 'exceeds expectations '! \ N ");} else {printf (" sorry, your prize doesn't exist. \ n ") ;}} return 0 ;}
     

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.