Electronic clock, Electronic Table

Source: Internet
Author: User

Electronic clock, Electronic Table
1027: electronic clock score: 10 time limit: 1 second memory limit: 32 MB Special Judgment: No submitted: 17 solution: 11 tags

  • Simulation
Description

An electronic clock uses four numbers to represent time. Each number is 3*3 in size. The characters used to represent numbers include '|', '_', and spaces.

Now, let us know how the clock shows the current time.

The digital style displayed by the clock is as follows:

    _  _     _  _  _  _  _  _   | _| _||_||_ |_   ||_||_|| |  ||_  _|  | _||_|  ||_| _||_|

Input Format

The input contains multiple groups of test data. Each input group contains four integers, indicating the current time.

Output

For each input group, the time style displayed by the electronic clock is output.

Sample Input

1 2 5 6
2 3 4 2

Sample output

___
| _
| _ |
___
_ |

| _




# Include <stdio. h> int main () {int n [4], I; while (scanf ("% d", & n [0], & n [1], & n [2], & n [3])! = EOF) {for (I = 0; I <4; I ++) {switch (n [I]) {case 1: case 4: // No output is allowed if no output is available. A space is required !!! Printf (""); break; default: printf ("_") ;}// the first row of printf ("\ n"); for (I = 0; I <4; I ++) {switch (n [I]) {case 1: case 7: printf ("|"); break; case 2: case 3: printf ("_ |"); break; case 4: case 8: case 9: printf ("| _ |"); break; case 5: case 6: printf ("| _"); break; case 0: printf ("|") ;}} printf ("\ n"); for (I = 0; I <4; I ++) {switch (n [I]) {case 1: case 4: case 7: printf ("|"); break; case 2: printf ("| _"); break; case 3: case 5: case 9: printf ("_ |"); break; case 6: case 8: case 0: printf ("| _ |"); break;} printf ("\ n ");}}


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.