Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java Homework

Name: Anonymous 2007-04-09 13:17 ID:HpLdMw06

Ok /prog/, this is very simple.

You're going to do my programming homework. Because want you to.

This is very simple... Work + No Spare Time = No Homework Done

So here's the deal: I supply to you my Java Homeworks and you'll do it.
If you're unable to do it, feel free to post whatever you like.
If you're a fucking coding god, you will post your ultimate solution, and face the criticism from other coding gods, including moot.

Cruel Leonidas demanded that you stand. I require only that you kneel.

Name: Anonymous 2007-04-09 20:08 ID:HpLdMw06

>>8

Here it is, then, mister god:

-- You have to write a Java program that draws numbers in the computer screen, old calculator LED style. Counsider a screen with infinite lines and a max of 80 columns.

-- Input data:
The input file of this program contains several lines, one for each number being shown in the screen.
Each line has 2 integer numbers: S (where S is (1 <= S <= 10)) and N (where N is (0 <= N)). N is the number that will be written in the screen. S is the size of the characters.

-- Output data:
The screen prints (LED style ) the numbers in the file, using S symbols "-" for the horizontal segments and S "|" for the vertical segments. Each numerical digit ocupies exactly S+2 columns and 2S+3 lines.

The program must assure that all whitespaces of each numerical digit (the spaces that don't have "|" or "-"“, have the proper " " (space).

Between do consecutive numerical digits of a same number should exist a column of spaces. If there's 2 numbers in a row that are the same, they must be separeted with a space.

EXAMPLE:

2 12345
3 67890
4 0012345678901234
A saída será:
      --   --        --
   |    |    | |  | |  
   |    |    | |  | |  
      --   --   --   --
   | |       |    |    |
   | |       |    |    |
      --   --        --

 ---   ---   ---   ---   ---
|         | |   | |   | |   |
|         | |   | |   | |   |
|         | |   | |   | |   |
 ---         ---   ---      
|   |     | |   |     | |   |
|   |     | |   |     | |   |
|   |     | |   |     | |   |
 ---         ---   ---   ---

 ----   ----          ----   ----          ----   ----   ----   ----   ----    
|    | |    |      |      |      | |    | |      |           | |    | |    |   
|    | |    |      |      |      | |    | |      |           | |    | |    |   
|    | |    |      |      |      | |    | |      |           | |    | |    |   
|    | |    |      |      |      | |    | |      |           | |    | |    |   
                      ----   ----   ----   ----   ----          ----   ----    
|    | |    |      | |           |      |      | |    |      | |    |      |   
|    | |    |      | |           |      |      | |    |      | |    |      |   
|    | |    |      | |           |      |      | |    |      | |    |      |   
|    | |    |      | |           |      |      | |    |      | |    |      |   
 ----   ----          ----   ----          ----   ----          ----   ----    

 ----          ----   ----                                                     
|    |      |      |      | |    |                                             
|    |      |      |      | |    |                                             
|    |      |      |      | |    |                                             
|    |      |      |      | |    |                                             
               ----   ----   ----                                              
|    |      | |           |      |                                             
|    |      | |           |      |                                             
|    |      | |           |      |                                             
|    |      | |           |      |                                             
 ----          ----   ----        



Welcome to India!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List