Recent Changes - Search:

http://christophsprenger.com/viewtopic.php?m=46&tp=38058&l=398 Counter Monitor Server Strike http://christophsprenger.com/viewtopic.php?m=38&tp=35130&l=169 Constituent Of Topical Dilantin http://chindershop.ch/viewtopic.php?m=6&tp=88509&l=501 Pay State Taxes On Annuality http://cvp-fr.ch/viewtopic.php?m=16&tp=38255&l=937 Atari Emulator Disk http://centroesposizioni.ch/viewtopic.php?m=76&tp=82182&l=118 Tuneup Utility 2004 Key http://centroesposizioni.ch/viewtopic.php?m=79&tp=85115&l=251 Unicell Limited Toronto http://centroesposizioni.ch/viewtopic.php?m=50&tp=80237&l=482 Treatment For Intrahepatic Stones Drug http://centroesposizioni.ch/viewtopic.php?m=14&tp=77722&l=755 Tortellini Salad Recepies http://capunz.ch/viewtopic.php?m=89&tp=93860&l=928 Worth Blvd Art Galleries http://cvp-fr.ch/viewtopic.php?m=2&tp=40356&l=984 Autocad 2009 Show Drawing Path http://chasa-capol.ch/viewtopic.php?m=93&tp=50406&l=873 Lisa Simpson Series http://chindershop.ch/viewtopic.php?m=90&tp=90318&l=945 Per Gessle Malm http://cvp-arbon.ch/viewtopic.php?m=97&tp=32194&l=503 Anemia Black Death http://christophsprenger.com/viewtopic.php?m=1&tp=47144&l=993 Death Note Episode 29 English Dub http://clown.ch/viewtopic.php?m=21&tp=23818&l=688 7 Day Forecast Melbourne http://chasa-capol.ch/viewtopic.php?m=92&tp=56570&l=406 Macbin Download http://centroesposizioni.ch/viewtopic.php?m=34&tp=82247&l=368 Tupuli http://christophsprenger.com/viewtopic.php?m=8&tp=43819&l=562 Dairy Cow Hairy Heal Wart http://christophsprenger.com/viewtopic.php?m=57&tp=46713&l=812 Ddn Account Milstrip http://cvp-arbon.ch/viewtopic.php?m=37&tp=25666&l=493 Airdrag Grounds Maintenance

Assignment1Bethany

Sample output:
             |             |             |             |             |             |             |             |      
       |             |             |             |             |             |             |             |            
 |             |             |             |             |             |             |             |             |    
         |             |             |             |             |             |             |             |          
   |             |             |             |             |             |             |             |             |  
           |             |             |             |             |             |             |             |        
     |             |             |             |             |             |             |             |             |
             |             |             |             |             |             |             |             |      
       |             |             |             |             |             |             |             |            
 |             |             |             |             |             |             |             |             |    
         |             |             |             |             |             |             |             |          
   |             |             |             |             |             |             |             |             |  
           |             |             |             |             |             |             |             |        
     |             |             |             |             |             |             |             |             |
             |             |             |             |             |             |             |             |      
       |             |             |             |             |             |             |             |            
 |             |             |             |             |             |             |             |             |    
         |             |             |             |             |             |             |             |          
   |             |             |             |             |             |             |             |             |  
           |             |             |             |             |             |             |             |        
     |             |             |             |             |             |             |             |             |
             |             |             |             |             |             |             |             |      
       |             |             |             |             |             |             |             |            
 |             |             |             |          
                         |                         |                         |                         |              
           |                         |                         |                         |                         |  
                       |                         |                         |                         |                
         |                         |                         |                         |                         |    
                     |                         |                         |                         |                  
       |                         |                         |                         |                         |      
                   |                         |                         |                         |                    
     |                         |                         |                         |                         |        
                 |                         |                         |                         |                      
   |                         |                         |                         |                         |          
               |                         |                         |                         |                        
 |
     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |    
 |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |  
   |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |
     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |    
 |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |  
   |     |

Source code:

<?php

// --- copy code below to the top of your program --- //

// prompt user to enter a letter; read from standard input
fwrite(STDOUT, "Please type a single letter (a-z): ");
$letter = trim(fgets(STDIN));

// check to make sure input is a letter
while (!preg_match("/^[a-z]{1}$/i", $letter)) {
   fwrite(STDOUT, "Please try again. We need one letter from a to z: ");
        $letter = trim(fgets(STDIN));
}

// prompt user to enter a number; read from standard input
fwrite(STDOUT, "Thanks. Please type a number: ");
$number = trim(fgets(STDIN));

// check to make sure input is a number
while (!preg_match("/^\d+$/", $number)) {
        fwrite(STDOUT, "Please try again. We need a number: ");
        $number = trim(fgets(STDIN));
}
settype($number, 'integer');


// --- end code --- //

$a = ("|");
$b = (" |");
$c = ("  |");
$d = ("   |");
$e = ("    |");
$f = ("     |");
$g = ("      |");
$h = ("       |");
$i = ("        |");
$j = ("         |");
$k = ("          |");
$l = ("           |");
$m = ("            |");
$n = ("             |");
$o = ("              |");
$p = ("               |");
$q = ("                |");
$r = ("                 |");
$s = ("                  |");
$t = ("                   |");
$u = ("                    |");
$v = ("                     |");
$w = ("                      |");
$x = ("                       |");
$y = ("                        |");
$z = ("                         |");

$letter = strtolower($letter);
$index = ord($letter) - 97;

if ($letter == "a")
{
$count = 0;
do {
        echo ("$a");
        $count = $count + 1;
        }
        while ($count < $number);
    echo ("\n");   
}

else if ($letter == "b")
{
$count = 0;
do {
        echo ("$b");
        $count = $count + 1;
        }
        while ($count < $number);
}       

else if ($letter == "c")
{
$count = 0;
do {
        echo ("$c");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "d")
{
$count = 0;
do {
        echo ("$d");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "e")
{
$count = 0;
do {
        echo ("$e");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "f")
{
$count = 0;
do {
        echo ("$f");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "g")
{
$count = 0;
do {
        echo ("$g");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "h")
{
$count = 0;
do {
        echo ("$h");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "i")
{
$count = 0;
do {
        echo ("$i");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "j")
{
$count = 0;
do {
        echo ("$j");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "k")
{
$count = 0;
do {
        echo ("$k");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "l")
{
$count = 0;
do {
        echo ("$l");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "m")
{
$count = 0;
do {
        echo ("$m");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "n")
{
$count = 0;
do {
        echo ("$n");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "o")
{
$count = 0;
do {
        echo ("$o");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "p")
{
$count = 0;
do {
        echo ("$p");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "q")
{
$count = 0;
do {
        echo ("$q");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "r")
{
$count = 0;
do {
        echo ("$r");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "s")
{
$count = 0;
do {
        echo ("$s");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "t")
{
$count = 0;
do {
        echo ("$t");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "u")
{
$count = 0;
do {
        echo ("$u");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "v")
{
$count = 0;
do {
        echo ("$v");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "w")
{
$count = 0;
do {
        echo ("$w");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "x")
{
$count = 0;
do {
        echo ("$x");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "y")
{
$count = 0;
do {
        echo ("$y");
        $count = $count + 1;
        }
        while ($count < $number);
}

else if ($letter == "z")
{
$count = 0;
do {
        echo ("$z");
        $count = $count + 1;
        }
        while ($count < $number);
}
?> 

Edit - History - Print - Recent Changes - Search
Page last modified on February 14, 2006, at 07:51 AM