Home  • Programming • JavaScript

Find the largest number among three numbers.

 let a=parseFloat(prompt("Enter first number"));
 let b=parseFloat(prompt("Enter second number"));
 let c=parseFloat(prompt("Enter third number"));

if(a>b){
   
    if(a>c){
         document.write(a);
    }else{
         document.write(b);
    }

}else{

    if(b>c){
          document.write(b);
    }else{
           document.write(c);
    }
}

Comments 0


Copyright © 2024. Powered by Intellect Software Ltd