Created
November 13, 2012 17:22
-
-
Save tdantas/4067114 to your computer and use it in GitHub Desktop.
Programming Trick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Objective: | |
Write a program that prints out a multiplication table of the first 10 prime numbers. | |
The program must run from the command line and print to screen 1 table. | |
Across the top and down the left side should be the 10 primes, and the body of the table should | |
contain the product of multiplying these numbers. | |
Please include Rspec tests. | |
P.s. the prime numbers should be calculated, rather than using Ruby’s Prime Method | |
## OUTPUT ## | |
x 2 3 5 7 11 13 ... | |
2 4 6 10 14 22 26 | |
3 | |
5 | |
7 | |
11 | |
13 | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment