Skip to content

Commit 855d85d

Browse files
problem2 solved
1 parent a8731ed commit 855d85d

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

problem1/problem.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ Sample Input:
1212
1000
1313
700
1414
Output:
15-
300
15+
300
16+
17+
18+
[Source: https://drive.google.com/drive/u/1/folders/1FbntkDTYNA33BuiqJ9TVF9-YWlqvhZch](https://drive.google.com/drive/u/1/folders/1FbntkDTYNA33BuiqJ9TVF9-YWlqvhZch)

problem2/problem.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Write a program to calculate the average marks of Mathematics, Biology, Chemistry, Physics, and
2+
Bangla of a student.
3+
Input:
4+
The first line of the input is the marks of the five subjects mentioned above, respectively.
5+
Output:
6+
Print the result in 2 decimal places.
7+
8+
Practice Problem 2
9+
10+
Sample Input:
11+
75.25, 65, 80, 35.45, 99.50
12+
Output:
13+
71.04
14+
15+
[Source: https://drive.google.com/drive/u/1/folders/1FbntkDTYNA33BuiqJ9TVF9-YWlqvhZch](https://drive.google.com/drive/u/1/folders/1FbntkDTYNA33BuiqJ9TVF9-YWlqvhZch)

problem2/problem2.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
var mathematicsResult = 75.25;
4+
var biologyResult = 65;
5+
var chemistryResult = 80;
6+
var physicsResult = 35.45;
7+
var banglaResult = 99.50;
8+
9+
var totalMarks = mathematicsResult + biologyResult + chemistryResult + physicsResult + banglaResult;
10+
11+
12+
var averageMarks = totalMarks / 5 ;
13+
var averageMarksIn2Deci = averageMarks.toFixed(2);
14+
console.log(parseFloat(averageMarksIn2Deci));
15+

0 commit comments

Comments
 (0)