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

С#
Posted by Robert 22 Oct 2014 02:23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Name
{
    class Program
    {
        static void Main(string[] args)
        {
          int  a = int.Parse(Console.ReadLine());
            if ((1 >= a)&&(a<=4)) Console.WriteLine("few");
            if ((5 >= a)&&(a<=9)) Console.WriteLine("several");
            if ((10 >= a)&&(a<=19)) Console.WriteLine("pack");
            if ((20 >= a)&&(a<=49)) Console.WriteLine("lots");
            if ((50 >= a)&&(a<=99)) Console.WriteLine("horde");
            if ((100 >= a)&&(a<=249)) Console.WriteLine("throng");
            if ((250 >= a)&&(a<=499)) Console.WriteLine("swarm");
            if ((500 >= a)&&(a<=999)) Console.WriteLine("zounds");
            if (1000 >= a) Console.WriteLine("legion");
        }
    }
}
Re: С#
Posted by PI-2014_Movchan 8 Apr 2015 01:48
(1 >= a)&&(a<=4)
Robert wrote 22 October 2014 02:23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Name
{
    class Program
    {
        static void Main(string[] args)
        {
          int  a = int.Parse(Console.ReadLine());
            if ((1 >= a)&&(a<=4)) Console.WriteLine("few");
            if ((5 >= a)&&(a<=9)) Console.WriteLine("several");
            if ((10 >= a)&&(a<=19)) Console.WriteLine("pack");
            if ((20 >= a)&&(a<=49)) Console.WriteLine("lots");
            if ((50 >= a)&&(a<=99)) Console.WriteLine("horde");
            if ((100 >= a)&&(a<=249)) Console.WriteLine("throng");
            if ((250 >= a)&&(a<=499)) Console.WriteLine("swarm");
            if ((500 >= a)&&(a<=999)) Console.WriteLine("zounds");
            if (1000 >= a) Console.WriteLine("legion");
        }
    }
}