Kamis, 01 November 2018

PHP Arithmetic Operators

Buatlah 4 contoh PHP Arithmetic Operators dengan modifikasi yang berbeda beda 

Jawaban: 
<!doctype html>
<html>
 <head>PHP Arithmetic Operators
  <title>PHP</title>
 </head>
 <body><br>
 <?php
 $x = 12;
 $y = 6;
 echo $x + $y;
 ?>

 <br>
 <?php
 $x = 20;
 $y = 6;
 echo $x - $y;
 ?>

 <br>
 <?php
 $x = 5;
 $y = 6;
 echo $x * $y;
 ?>

 <br>
 <?php
 $x = 18;
 $y = 3;
 echo $x / $y;
 ?>

 <br>
 <?php
 $x = 16;
 $y = 5;
 echo $x % $y;
 ?>

 <br>
 <?php
 $x = 2;
 $y = 3;
 echo $x ** $y;
 ?>
 </body>
</html>

Tidak ada komentar:

Posting Komentar

Perintah ( QUERY ) HTML

Macam macam perintah ( QUERY ) HTML 1. Document Summary <html> ... </html> adalah elemen akar di dalam htm...