Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body style="background-color:yellow"></body>
- <style type="text-align:center">
- #highlight{font:bold 80px Impact,Arial,Sans-Serif;}
- </style>
- <script language="javascript" type="text/javascript">
- var teks="ANGGIT LUGAS PRADIKA TI 08 " //
- var speed=25 //
- if (document.all||document.getElementById) {
- document.write('<h1 id="highlight" style="text-align: center">' + teks + '</h1>')
- var storetext=document.getElementById? document.getElementById("highlight") :
- document.all.highlight
- } else document.write(text)
- var hex=new Array("00","14","28","3C","50","64","78","8C","A0","B4","C8","DC","F0")
- var r=1
- var g=1
- var b=1
- var seq=1
- function changetext() {
- rainbow="#"+hex[r]+hex[g]+hex[b]
- storetext.style.color=rainbow
- }
- function change() {
- if (seq==6) {
- b--
- if (b==0)
- seq=1
- }
- if (seq==5) {
- r++
- if (r==12)
- seq=6
- }
- if (seq==4) {
- g--
- if (g==0)
- seq=5
- }
- if (seq==3) {
- b++
- if (b==12)
- seq=4
- }
- if (seq==2) {
- r--
- if (r==0)
- seq=3
- }
- if (seq==1) {
- g++
- if (g==12)
- seq=2
- }
- changetext()
- }
- function starteffect() {
- if (document.all||document.getElementById)
- flash=setInterval("change()",speed)
- }
- starteffect()
- </script>
- <div align='center'><img src='fastikom.jpg' /></div>
- </html>
- <?php
- FUNCTION luas_ling(){
- if (isset($_POST['jari'])) {
- $r=$_POST['jari'];
- $Luas=3.14*$r*$r;
- echo $Luas;
- }
- echo '<form action="" method="post">
- Menghitung L.Lingkaran (masukan jari2) : <input type="text" name="jari" size="15"><br>
- <input type="submit" name="submit" valu="Hitung">
- </form>';
- }
- FUNCTION kel_lingkaran(){
- if (isset($_POST['kling'])) {
- $r=$_POST['kling'];
- $keliling=2*3.14*$r;
- echo $keliling;
- }
- echo '<form action="" method="post">
- Menghitung K.Lingkaran (masukan jari2) : <input type="text" name="kling" size="15"><br>
- <input type="submit" name="submit" valu="Hitung">
- </form>';
- }
- FUNCTION luas_segitiga(){
- if (isset($_POST['alas'])) {
- $a=$_POST['alas'];
- $t=$_POST['tinggi'];
- $luas=($a*$t)/2;
- echo $luas;
- }
- echo '<form action="" method="post">
- Menghitung L.segitiga (masukan angka) <br> A : <input type="text" name="alas" size="15"><br> T : <input type="text" name="tinggi" size="15"><br>
- <input type="submit" name="submit" valu="Hitung">
- </form>';
- }
- FUNCTION kel_segitiga(){
- if (isset($_POST['alas'])) {
- $a=$_POST['a'];
- $t=$_POST['t'];
- $m=$_POST['m'];
- $keliling=($a)+($t)+($m);
- echo $keliling;
- }
- echo '<form action="" method="post">
- Menghitung K.segitiga (masukan angka) <br> A : <input type="text" name="a" size="15"><br> T : <input type="text" name="t" size="15"><br>
- M : <input type="text" name="m" size="15"><br> <input type="submit" name="submit" valu="Hitung">
- </form>';
- }
- FUNCTION luas_trapesium($sisi_A,$sisi_B,$t){
- $sisi_A=$sisi_A;
- $sisi_B=$sisi_B;
- $t=$t;
- $luas=(($sisi_A + $sisi_B)*$t)/2;
- RETURN $luas;
- }
- FUNCTION kel_trapesium($sisi_A,$sisi_B,$sisi_C,$sisi_D,$t){
- $sisi_A=$sisi_A;
- $sisi_B=$sisi_B;
- $sisi_C=$sisi_C;
- $sisi_D=$sisi_D;
- $keliling=$sisi_A + $sisi_B + $sisi_C + $sisi_D;
- RETURN $keliling;
- }
- FUNCTION luas_kerucut($r,$s){
- $r=$r;
- $s=10;
- $luas=3.14*$r*($r+$s);
- RETURN $luas;
- }
- FUNCTION keliling_kerucut($r,$s){
- $r=$r;
- $s=$s;
- $keliling=2*(2*3.14*$r)+$s+$s;
- RETURN $keliling;
- }
- FUNCTION luas_perpan($p,$l){
- $p=$p;
- $l=$l;
- $luas=$p*$l;
- RETURN $luas;
- }
- FUNCTION keliling_perpan($p,$l){
- $p=$p;
- $l=$l;
- $keliling=2*($p+$l);
- RETURN $keliling;
- }
- FUNCTION faktor($ftr){
- $ftr=$ftr;
- $x=1;
- for($y=$ftr; $y>=1; $y--){
- $x=$x*$y;
- }
- RETURN $x;
- }
- if (isset($_GET['x']) == 'Lling') {
- luas_ling();
- }
- if (isset($_GET['x']) == 'Kling') {
- kel_lingkaran();
- }
- if (isset($_GET['x']) == 'lsegitiga') {
- luas_segitiga();
- }
- if (isset($_GET['x']) == 'ksegitiga') {
- kel_segitiga();
- }
- //**********|PROGRAM PROGRAM PENTING|**********//
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement