|
|
вернуться в форумС# Послано Robert 22 окт 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: С# (1 >= a)&&(a<=4) 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"); } } } |
|
|