Loading ...
Sorry, an error occurred while loading the content.

Re: [ilmukomputer-programming] soal PHP

Expand Messages
  • Zulkarnaen Arsi
    Contoh penggunaan IF untuk menampilkan bil. genap antara 1 s.d. 30
    Message 1 of 5 , Oct 31, 2005
    • 0 Attachment
      <html>

      <head><title>Contoh penggunaan IF untuk menampilkan bil. genap antara 1 s.d.
      30</title></head>

      <body>

      <?

      for ($i=1; $i<=30; $i++){ //looping for

      if ($i % 2 == 0){ // cek apakah habis dibagi 2?

      echo "$i<br>";

      }

      }

      ?>

      </body></html>


      --
      Best Regard
      -Zulkarnaen arsi-
      Yahoo Messenger id: ars1soft
      Personal Site: http://zul.arsisoft.com


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.