Skip to content

Commit bfd4b3e

Browse files
problem 9 completed and problem 10 initilized completed
1 parent 70e5137 commit bfd4b3e

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

problem10/problem.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You are given a triangle with the sides 9, 8, 9. Write a program to check whether a
2+
triangle is Isosceles or not using if-else.
3+
4+
Isosceles => two sides are equal
5+
6+
7+
[View problem source 📤](https://drive.google.com/file/d/1bfxye7A1p-BBJCQCXaiUetl_qyS2Vc1E/view)

problem10/problem10.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* You are given a triangle with the sides 9, 8, 9. Write a program to check whether a
2+
triangle is Isosceles or not using if-else.
3+
4+
Isosceles => two sides are equal
5+
6+
7+
[View problem source 📤](https://drive.google.com/file/d/1bfxye7A1p-BBJCQCXaiUetl_qyS2Vc1E/view) */

problem9/problem.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
You are given three numbers 13, 79, and 45. Write a program that will print the
2+
largest number using if-else.
3+
4+
5+
[View problem source 📤](https://drive.google.com/file/d/1bfxye7A1p-BBJCQCXaiUetl_qyS2Vc1E/view)

problem9/problem9.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
/* You are given three numbers 13, 79, and 45. Write a program that will print the
3+
largest number using if-else.
4+
5+
6+
[View problem source 📤](https://drive.google.com/file/d/1bfxye7A1p-BBJCQCXaiUetl_qyS2Vc1E/view) */
7+
8+
9+
var num1 = 13;
10+
var num2 = 79;
11+
var num3 = 45;
12+
13+
if( num1 > num2 && num1 > num3){
14+
console.log("The largest number is " + num1);
15+
}
16+
17+
else if ( num2 > num3){
18+
console.log("The largest number is " + num2);
19+
}
20+
21+
else{
22+
console.log("The largest number is " + num3);
23+
}

0 commit comments

Comments
 (0)