The army of units

Report a typo

Each gamer has an army of units. Write a program that classifies the army of your enemies in accordance with these rules:

Units:  Category
less than 1: no army
from 1 to 4: few
from 5 to 9: several
from 10 to 19: pack
from 20 to 49: lots
from 50 to 99: horde
from 100 to 249: throng
from 250 to 499: swarm
from 500 to 999: zounds
1000 and more: legion

The program should read the number of units and output the corresponding category.

Sample Input 1:

5

Sample Output 1:

several

Sample Input 2:

303

Sample Output 2:

swarm
Write a program in Kotlin
fun main() {
// write your code here
}
___

Create a free account to access the full topic