Skip to content

Commit

Permalink
print largest of three numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
sanskaarz committed Dec 1, 2024
1 parent e92a2d4 commit 8660821
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Extras/Max number.js

This file was deleted.

25 changes: 25 additions & 0 deletions Extras/maxOfThreeNumbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
let a = 3;
let b = 5;
let c = 11;
if (a > b) {
if (a > c) {
console.log(a);
} else {
console.log(c);
}
} else {
if (b > c) {
console.log(b);
}
else {
console.log(c);
}
}
// let arr1 = prompt("enter number 1");
// let arr11 = arr1.split(",");
// let arr2 = prompt("enter number 2");
// let arr22 = arr2.split();
// let arr3 = prompt("enter number 3");
// let arr33 = arr3.split()
// let total = arr11.concat(arr22 , arr33)
// console.log(Math.max(...total));

0 comments on commit 8660821

Please sign in to comment.