Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Javascript</title>
- </head>
- <body>
- <script>
- console.log("Hello");
- // input
- let a = 15;
- let b = 15;
- let c = 15;
- // algorithm
- /*
- let max;
- if (a > b){
- if (a > c){
- max = a;
- } else {
- max = c;
- }
- } else {
- if (b > c){
- max = b;
- } else {
- max = c;
- }
- }
- */
- /*
- if ((a >= b) && (a >= c)){
- max = a;
- }
- if ((b >= a) && (b >= c)){
- max = b;
- }
- if ((c >= a) && (c >= b)){
- max = c;
- }
- */
- // output
- console.log("Maximum value is " + max);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement