a algorithm whether a number is a single digit number,
two-digit number, three-digit number, four-digit number or just more than four-digit number
input:
int n number
case : 0 <= n <= 9
display: 'this is single digit number'
case: 10 <= n <= 99
display: 'this is two-digit number'
case: 100 <= n <= 999
display: 'this is three-digit number'
case: 1000 <= n <= 9999
display: 'this is four-digit number'
case: n => 10000
display: 'this is more than four-digit number'
Comments
Leave a comment