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

Help
Posted by PI-2014_Pelevin 7 May 2014 02:16
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("vvedit a");
            int a = int.Parse(Console.ReadLine());
           if((1<=a)&&(a<=4)) Console.WriteLine("few") ;
      else if((5<=a)&&(a<=9)) Console.WriteLine("several");
           else if ((10 <= a) && (a <= 19)) Console.WriteLine("pack");
           else if ((20 <= a) && (a <= 49)) Console.WriteLine("lots");
           else if ((50 <= a) && (a <= 99)) Console.WriteLine("horde");
           else if ((100 <= a) && (a <= 249)) Console.WriteLine("throng");
           else if ((250 <= a) && (a <= 499)) Console.WriteLine("swarm");
           else if ((500 <= a) && (a <= 999)) Console.WriteLine("zounds");
           else if ((1000 <= a) && (a <= 2000)) Console.WriteLine("legion");


           }
        }
    }
Re: Help
Posted by Ednal 14 May 2014 00:33
See on your selection statements. variable cannot be less then one and four at once.
You maybe had in mind (1>=a)&(a<=4)