Signal display for Microsoft phones
Microsoft has recently unveiled a feature-simple mobile phone that displays cell phone signals on a mobile phone with an area containing 7x77 \times 77x7 pixels. When full signal is displayed as follows:
Each cell signal (sectionI (1≤i≤5) I (1 \le i \le 5)I(1≤I≤5) Lattice signal hasIiI A-
) represents20%20\%20% of the signal strength,a portion of the signal is not displayed。 The current network transfer mode is also displayed in the upper-right corner. At a signal strength not less than90%90\%90 % when 4G
is displayed, when the signal is below 90%90\%< Span class= "katex-html" >9 0%, not less than 60%60 \%6 0% when 3G
is displayed, otherwise E
is displayed.
For a given current signal strength of d%d\% D, the output signal is 7x77 \times 77x7 pixel pattern.
Input format
Enter an integer d (0≤d≤100) d (0 \le D \le)D(0≤d≤100) to indicate signal strength.
Output format
Do not output extra whitespace characters at the end of each line, as required by the topic.
Sample Input 1
0
Sample Output 1
+-----+| e| | | | | | | | | +-----+
Sample Input 2
65
Sample Output 2
+-----+|- 3g| | -- || --- || || | +-----+
The direct 6 if is possible.
1#include <bits/stdc++.h>2 using namespacestd;3 intMain () {4 intD;5Cin>>D;6 if(D < -){7cout <<"+-----+\n| e|\n| |\n| |\n| |\n| |\n+-----+\n"<<Endl;8}Else if(D < +){9cout <<"+-----+\n|-e|\n| |\n| |\n| |\n| |\n+-----+\n"<<Endl;Ten}Else if(D < -){ Onecout <<"+-----+\n|-e|\n|--|\n| |\n| |\n| |\n+-----+\n"<<Endl; A}Else if(D < the){ -cout <<"+-----+\n|-3g|\n|--|\n|---|\n| |\n| |\n+-----+\n"<<Endl; -}Else if(D < -){ thecout <<"+-----+\n|-3g|\n|--|\n|---|\n|----|\n| |\n+-----+\n"<<Endl; -}Else if(D < -){ -cout <<"+-----+\n|-4g|\n|--|\n|---|\n|----|\n| |\n+-----+\n"<<Endl; -}Else if(d = = -){ +cout <<"+-----+\n|-4g|\n|--|\n|---|\n|----|\n|-----|\n+-----+\n"<<Endl; - } + return 0; A}
Signal display for Microsoft phones