Answer to Question #255983 in UNIX/Linux Programming for Man

Question #255983
Write a script to find if number is one digit or double digits. Hint- (num1>=10)
1
Expert's answer
2021-10-24T18:32:25-0400
#!/bin/bash


echo "Input number";
read number;


if (( ((number >= 10) && (number <= 99)) || ((number <= -10) && (number >= -99)) )); then
    echo "Double digits";
elif (( (number < 10) && (number > -10) )); then
    echo "One digit";
fi

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS