Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imrahul05/numbersystem
https://github.com/imrahul05/numbersystem
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/imrahul05/numbersystem
- Owner: imRahul05
- Created: 2024-11-18T12:00:21.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T12:25:28.000Z (2 months ago)
- Last Synced: 2024-11-18T13:55:14.562Z (2 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is the NumberSystem Repo
This Repo is included odd and even number and to find a prime number
1. Odd and Even Number
Here to find odd and even inside an array using for loop.
const numbers = [
3, 7, 2, 15, 9, 20, 5, 14, 12, 1, 8, 11, 6, 19, 4, 10, 17, 13, 16, 18,
];output
Even - 2 20 14 12 8 6 4 10 16 18
Odd - 3 7 15 9 5 1 11 19 17 13
2.FindPrimeNumberhere to find prime inside an array using for loop.
input -
const numbers = [
19, 23, 4, 16, 28, 13, 31, 8, 29, 14, 6, 35, 2, 11, 17, 5, 9, 27, 12, 30,
];output -
primeNumbers---> 19 23 13 31 29 11 17 5
[
19, 23, 13, 31,
29, 11, 17, 5
]
maximum prime number --> 31
minimum prime number --> 5
Total sum of all prime numbers --> 148