Skip to content

Commit 786bdc1

Browse files
problem 4 completed
1 parent 96f51fb commit 786bdc1

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

problem4/problem.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
4+
Sarah’s mother is teaching her mathematics. She gave Sarah a number and asked her what the
5+
remainder would be if she divided the number by 5. Help Sarah write the program.
6+
Input:
7+
The first line of the input contains the number.
8+
Output:
9+
Print the remainder.
10+
11+
Practice Problem 4
12+
13+
Sample Input:
14+
119
15+
16+
Output:
17+
4
18+
19+
20+
21+
[Source: https://drive.google.com/drive/u/1/folders/1FbntkDTYNA33BuiqJ9TVF9-YWlqvhZch](https://drive.google.com/drive/u/1/folders/1FbntkDTYNA33BuiqJ9TVF9-YWlqvhZch)

problem4/problem4.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
var sharahsNum = 119 ;
3+
var haveToDivideWith = 5 ;
4+
5+
var remiderOfTheNum = 119 % 5 ;
6+
7+
console.log(remiderOfTheNum);

0 commit comments

Comments
 (0)