Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
297 B
1
Indexable
#!/bin/bash

nornal_number="1234567890"
echo normal number $nornal_number
length=${#nornal_number}

reversed=""
while [ "$nornal_number" -gt "0" ]
do
    current_digit=expr $nornal_number % 10
    reversed="${reversed}${current_digit}"
    nornal_number=expr $nornal_number / 10
done