document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <form method="POST">
  2. Szám:(1-99)<br><input type=text name=szam><br>
  3. <input type=submit name=submit value=GO><br>
  4. </form>
  5. <?php
  6. $a = 0;
  7. if (isset($_POST[\'szam\'])){ $a=$_POST[\'szam\']; }
  8.  
  9. $egyes=$a%10;
  10. $tizes=($a-$egyes)/10;
  11.  
  12. if ($a != NULL){
  13.     if (($a > "-1")&&($a < "100")){
  14.         if ($a==10) {print("Tíz");}
  15.         else{
  16.             if ($a==20) {print("Húsz");}
  17.             else{
  18.                 if ($a==0) {print("Nulla");}
  19.                 else{
  20.         switch($tizes)
  21.         {
  22.         case "1": print("Tizen");break;
  23.         case "2": print("Huszon");break;
  24.         case "3": print("Harminc");break;
  25.         case "4": print("Negyven");break;
  26.         case "5": print("Ötven");break;
  27.         case "6": print("Hatvan");break;
  28.         case "7": print("Hetven");break;
  29.         case "8": print("Nyolcvan");break;
  30.         case "9": print("Kilencven");break;
  31.         }
  32.         switch($egyes)
  33.         {
  34.         case "1": print("egy");break;
  35.         case "2": print("kettő");break;
  36.         case "3": print("három");break;
  37.         case "4": print("négy");break;
  38.         case "5": print("öt");break;
  39.         case "6": print("hat");break;
  40.         case "7": print("hét");break;
  41.         case "8": print("nyolc");break;
  42.         case "9": print("kilenc");break;
  43.         }
  44.                     }
  45.                 }
  46.         }
  47.     }
  48. }
  49. ?>
');