ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1785. Lost in Localization

solution du problem 1785 accepted in gcc\c++
Posted by Imane 2 Jul 2015 03:52
#include <stdio.h>
#include<math.h>
 int main(){
     int a=1;
     while ( a!= 0){


     scanf("%d",&a);
        if (a>=1)
        if (a<=4)
        printf("few\n");
        if (a>=5)
        if (a<=9)
        printf("several\n");
        if (a>=10)
        if (a<=19)
        printf("pack\n");
        if (a>=20)
        if (a<=49)
        printf("lots\n");
        if (a>=50)
        if (a<=99)
        printf("horde\n");
        if (a>=100)
        if (a<=249)
        printf("throng\n");
        if (a>=250)
        if (a<=499)
        printf("swarm\n");
        if (a>=500)
        if (a<=999)
        printf("zounds\n");
        if (a>=1000)
        printf("legion\n");
}

     return 0;
 }

Edited by author 02.07.2015 03:53