Cell Phone Signal

Source: Internet
Author: User

Cell Phone signal time limit:3000/1000ms (java/other) Memory limit:65535/32768k (Java/other) total submission (s): Accepted Su Bmission (s): 9font:times New Roman | Verdana | Georgiafont Size:←→problem Description is now circulating on the market a simple mobile phone, on the phone with a 7x7 display to display cell phone signals, each block can display a character. When full signal is displayed as follows:

+-----+
|-4g|
|-----|
|-----|
|---- |
|-----|
+-----+
(Hangzhou electric Description block on the width of the setting is not uniform, the correct display please see the output sample)
Each signal (1≤I≤5) signal has a signal strength of 20%, which is not shown in the portion of the signal less than one cell. The current network transfer mode is also displayed in the upper-right corner. Display 4G when signal strength is not less than 90%, show 3g when signal is below 90%, not less than 60%; otherwise display E.
The 7x7 pixel pattern of the output signal for the given current signal strength d%.
Input inputs an integer d (0≤d≤100) representing the signal strength. Output does not output extra whitespace characters at the end of each line, as required by the topic. Sample Input
16T
Sample Output
+-----+|    e| | | | | | | | |     +-----+ +-----+|-  3g| | --   || ---  ||     ||     | +-----+

This question is simple, the careful classification becomes;
1#include <iostream>//10052 using namespacestd;3 intMain () {4     intA;5      while(cin>>a) {6         intb=a/Ten;7cout<<"+-----+"<<Endl;8         if(b>=9){9cout<<"|-4g|"<<Endl;Ten}Else if(b>=6){ Onecout<<"|-3g|"<<Endl; A}Else if(b>=2){ -cout<<"|-e|"<<Endl; -}Else{ thecout<<"| e|"<<Endl; -         } -         if(b>=4) -cout<<"|--   |"<<Endl; +         Else -cout<<"| |"<<Endl; +         if(b>=6) Acout<<"|---  |"<<Endl; at         Else -cout<<"| |"<<Endl; -         if(b>=8) -cout<<"|---- |"<<Endl; -         Else -cout<<"| |"<<Endl; in         if(b==Ten) -cout<<"|-----|"<<Endl; to         Else +cout<<"| |"<<Endl; -cout<<"+-----+"<<Endl; the     } *  $     return 0;Panax Notoginseng}



Cell Phone Signal

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.