Kamis, 28 Februari 2013

Program Kalkulator


Contoh2_5.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> ::: Operasi Aritmatika ::: </title>
 
 </head>

 <body>
 <form action=operasi.php method=get>
 <center><h3>Operasi Aritmatik A dan B</h3></center>
 <table align=center bgcolor=#cedadc bordercolor=#cfdbdd>
                <tr>
                 <td> Masukan Nilai A </td>
                 <td><input type=text name=a size=10></td>
                </tr>
                <tr>
                 <td> Masukan Nilai B </td>
                 <td><input type=text name=b size=10></td>
                </tr>
                <tr>
                 <td> Operasi </td>
                 <td>
                 <select name=c>
                 <option value=1> Penjumlahan [a+b] </option>
                 <option value=2> Pengurangan [a-b] </option>
                 <option value=3> Perkalian [a*b] </option>
                 <option value=4> Pembagian [a/b] </option>
                 </select>
                 </td>
                </tr>
                <tr>
                 <td colspan=2 align=center>
                 
                 <input type=submit value=hitung></td>
                </tr>

 </table>
 </form>

 </body>
</html>

File operasi.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> Hasil Operasi Aritmatik </title>

 </head>

 <body>
 <?
                $operasi=$_GET['c'];
                $a=$_GET['a'];
                $b=$_GET['b'];

                if ($operasi==1)
                {
                                $c=$a + $b;
                                $oper='[a+b]';
                }
                elseif ($operasi==2)
                {
                                $c=$a - $b;
                                $oper='[a-b]';
                }
                elseif ($operasi==3)
                {
                                $c=$a * $b;
                                $oper='[a*b]';
                }
                else
                {
                                $c=$a / $b;
                                $oper='[a/b]';
                }
                echo "Nilai A adalah = $a dan Nilai B adalah = $b <br>";
                echo "Nilai Operasi $oper adalah = $c <br>";

 ?>
 
 </body>
</html>

Selasa, 26 Februari 2013

Program Menghitung Diskon


contoh2_4.php

<html>
 <head>
  <title>.:: Program Menghitung Discount ::.</title>
 </head>
 <body>
 <font face=verdana size=2>
 <form method="POST">Jumlah Bayar :
 <input type=text name=totalbeli><br><br>
 <input type="submit" value="Hitung Discount">
 </form>
 <?php
 $toyar=$_POST['totalbeli'];
 {
$diskon=0;
if ($toyar>=500000)
$diskon=(0.5*$toyar);
else
if ($toyar>=100000)
$diskon=(0.1*$toyar);
else
if ($toyar>=50000)
$diskon=(0.05*$toyar);
printf ("<b><br>Jumlah Bayar = Rp. $toyar</b>");
printf ("<b><br>Diskon = Rp. $diskon</br></b>");
$jumlahbayar=$toyar-$diskon;
printf ("<b>Total Bayar = Rp. $jumlahbayar</b>");
 }
 ?>
 </body>
</html>

Remastering Ubuntu

Rabu, 17 Oktober 2012

PERTANYAAN
1. Apa pengertian dari remastering?
2. Apa tujuan remastering?
3. Sebutkan software-software yang digunakan dalam remastering!

JAWABAN
1. Remastering adalah sebuah proses untuk membuat sebuah Linux yang baru dari linux yang sudah ada.
2. Tujuan remastering adalah membuat distro Linux yang sesuai dengan keinginan.
3. Software Remaster
    - Remastersys (Ubuntu)
    - Reconstructor (Ubuntu)
    - UCK (Ubuntu Customation Kit) (Ubuntu)
    - Live Script (Slackware)
    - Revisor (RPM - Fedora)
    - Mklive CD (PC Linux OS)