Saturday, February 14, 2015

[PHP] Jack n' Poy

Problem: Create a Jack n' Poy game.

Input:
scissor-paper
paper-rock
scissor-rock
paper-paper
rock-rock

Output:
player one wins
player one wins
player two wins
draw
draw

[PHP] Triangle Asterisk

Problem: Let the user enter a number then use that number to determine the size of the triangle.

Input:
5

Output:
    *
   ***
  *****
 *******
*********
Related Posts Plugin for WordPress, Blogger...