1 unstable release
0.1.0 | Jan 31, 2025 |
---|
#685 in Development tools
129 downloads per month
15KB
Hail Stone Numbers
Hail Stone numbers that is a sequince number formed from a whole unit number.
Psedo Code
user_input: unit64
hailstone_numbers: Vector<unit64>
hailstone_numbers.push(user_input)
function(user_input)
function(user_input) {
match user_input % 2 {
0 => user_input = user_input / 2
1 => user_input = user_input * 3 + 1
}
hailstone_numbers.push(user_input)
if user_input = 1 {
print hailstone_numbers
exit 0
}
function(user_input)
}
Run The Program
- install rust
- cargo install hailstone_numbers
hailstone_numbers