Skip to content

Commit 49eab14

Browse files
reminder operator , result and supermarket some problem has been solved
1 parent 1e81326 commit 49eab14

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

A. Operator/reminder.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/** Problem-3
2+
You task is to divide the given number by 5 and show the remainder as the output.
3+
4+
Input: 119
5+
The first line of the input contains the number.
6+
7+
Output: 4
8+
Print the remainder.**/
9+
let inputNumber = 119;
10+
let remainder = 119 % 5;
11+
console.log(remainder);

A. Operator/result.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** Problem-2
2+
Write a program to calculate the average marks of Mathematics, Biology, Chemistry, Physics, and Bangla of a student.
3+
4+
Input:
5+
The first line of the input is the marks of the five subjects mentioned above, respectively. marks 75.25, 65, 80, 35.45, 99.50
6+
7+
Output: 71.04
8+
Print the result in 2 decimal places. **/
9+
let mathematic = 75.25;
10+
let biology = 65;
11+
let chemistry = 80;
12+
let physics = 35.45;
13+
let bangla = 99.50;
14+
let totalMarks = mathematic + biology + chemistry + physics + bangla;
15+
let averageMarks = totalMarks / 5;
16+
console.log(averageMarks.toFixed(2));

A. Operator/supermarket .js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
// Task-1
1+
/** Problem-1
22
3-
// You went to the supermarket to buy some oranges and apples. Calculate how much money the shopkeeper will return.
3+
You went to the supermarket to buy some oranges and apples. Calculate how much money the shopkeeper will return.
44
5-
// The first line of the input is the taka you have.
6-
// The second line is the cost of 1 kg of oranges and 1 kg of apples.
5+
Input:
6+
The first line of the input is the taka you have.
7+
The second line is the cost of 1 kg of oranges and 1 kg of apples.
78
8-
// result
9-
let taka = 1000;
10-
let
9+
Output:
10+
Print the result. **/
1111

12+
let myMoney = 1000;
13+
let oranges = 400;
14+
let apples = 300;
15+
let returnMoney = myMoney - (oranges + apples);
16+
console.log(returnMoney);

0 commit comments

Comments
 (0)