Advertisement
rana1704

three numbers & displays minimum and maximum

Nov 1st, 2020
3,035
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title></title>
  5. </head>
  6. <body>
  7.  
  8.     <?php
  9.  
  10.     $a=5; $b=10; $c=7;
  11.  
  12.     if(($a>$b)&&($a>$c))
  13.     echo "The Maximum is ".$a;
  14.  
  15.     if(($b>$a)&&($b>$c))
  16.     echo "The Maximum is ".$b;
  17.  
  18.     if(($c>$a)&&($c>$b))
  19.     echo "The Maximum is ".$c;
  20.     echo"<br>";
  21.     if(($a<$b)&&($a<$c))
  22.     echo "The Minimum is ".$a;
  23.  
  24.     if(($b<$a)&&($b<$c))
  25.     echo "The Minimum is ".$b;
  26.  
  27.     if(($c<$a)&&($c<$b))
  28.     echo "The Minimum is ".$c;
  29.  
  30.  
  31.  
  32.  
  33. ?>
  34. </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement