Files
3/divisibility_by_7.v
2025-02-07 00:05:12 +05:30

29 lines
372 B
V

import readline
fn seven(b int) {
mut c := b
mut d := 0
mut e := 0
mut f := 0
for c > 99 {
d = c / 10
e = c % 10
c = d - 2 * e
f += 1
}
if c % 7 == 0 {
println([c, f])
} else {
println('The number is not divisible by 7')
}
}
fn main() {
mut r := readline.Readline{}
answer := r.read_line('What is your number: ')!
a := answer.int()
seven(a)
}