Tecz
Virtual Store Owner
LEVEL 1
300 XP
In this tutorial, we are going to create on How To Check Number Divisible By 5. This program will run that will ask the user to enter their desired numeric value then the program will check if the given value is divisible in 5 or not. And we are using JavaScript for our Programming Language. This is a simple program that suited for the beginner in JavaScript.
JavaScript
This script will check the given number if it is divisible by 5 or not.
Output:
This is the result of the program in the given number that divisible by 5.
This is the result of the program in the given number that is not divisible by 5.
So what can you say about this work? Share your thoughts in the comment section below or email me at [email protected]. Practice Coding. Thank you very much.
Download
JavaScript
This script will check the given number if it is divisible by 5 or not.
- <
script>
- var
given_Number =
Number
(
prompt(
"Type your number to check if Divisible by 5 : "
)
)
;
- if
(
given_Number %
5
==
0
)
- {
- document.write
(
"<b style='color:blue; font-size:18px; font-family:cursive;'>The number <b style='color:red;'>"
- +
given_Number +
"</b> is divisible by <b style='color:red;'>5</b>. </b>"
)
;
- }
- else
- {
- document.write
(
"<b style='color:blue; font-size:18px; font-family:cursive;'>The number <b style='color:red;'>"
- +
given_Number +
"</b> is not divisible by <b style='color:red;'>5</b>. </b>"
)
;
- }
- </
script>
Output:
This is the result of the program in the given number that divisible by 5.

This is the result of the program in the given number that is not divisible by 5.

So what can you say about this work? Share your thoughts in the comment section below or email me at [email protected]. Practice Coding. Thank you very much.
Download
You must upgrade your account or reply in the thread to view hidden text.