find the largest number in else if javascript
// program to find the largest among three numbers
// take input from the user
const num1 = parseFloat(prompt("Enter first number: "));
const num2 = parseFloat(prompt("Enter second number: "));
const num3 = parseFloat(prompt("Enter third number: "));
let largest;
// check the condition
if(num1 >= num2 && num1 >= num3) {
largest = num1;
}
else if (num2 >= num1 && num2 >= num3) {
largest = num2;
}
else {
largest = num3;
}
// display the result
console.log("The largest number is " + largest);
Also in C:
- what is string::npos
- error: dereferencing pointer to incomplete type
- root in C
- sum of all column in matrix in c
- how to make infinite loop in c
- download file by command line windows
- what is fprintf in c
- clear screen c
- 1 212 32123 4321234 543212345 in c
- change custom post type icon
- is 33 prime number
- How to setup a line length marker in vim
- insert image material ui
- how to pass props to higher order component
- PS1 modified lags
- how to create random integers from a specific range in c language
- even odd c
- how to pass an array value to a pthread in c
- c unused parameter
- get the latest field in mongodb collection
- how to make two arrays equal in c
- what is constructor
- how to transfer textbox fro string to integer vb.net
- pip install sklearn specific version