Advertisement
irmantas_radavicius

Untitled

Nov 28th, 2021
1,041
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.65 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <title>Javascript</title>  
  5. </head>
  6. <body> 
  7.     <script>
  8.         console.log("Hello");
  9.        
  10.         // input
  11.         let a = 15;
  12.         let b = 15;
  13.         let c = 15;    
  14.        
  15.         // algorithm
  16.        
  17.        
  18.         /*
  19.         let max;
  20.         if (a > b){
  21.             if (a > c){
  22.                 max = a;
  23.             } else {
  24.                 max = c;
  25.             }
  26.         } else {
  27.             if (b > c){
  28.                 max = b;           
  29.             } else {
  30.                 max = c;
  31.             }          
  32.         }
  33.         */
  34.        
  35.         /*
  36.         if ((a >= b) && (a >= c)){
  37.             max = a;
  38.         }
  39.         if ((b >= a) && (b >= c)){
  40.             max = b;
  41.         }
  42.         if ((c >= a) && (c >= b)){
  43.             max = c;
  44.         }
  45.         */
  46.        
  47.         // output
  48.         console.log("Maximum value is " + max);
  49.    
  50.        
  51.     </script>      
  52.  
  53. </body>
  54. </html>
  55.  
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement