Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 4-2
- /*
- Console.WriteLine("Type your values:");
- Console.Write(" x = ");
- uint age = uint.Parse(Console.ReadLine());
- string[] ages = { " лет", " год", " года" };
- //int[] am = { 0, 1, 2, 2, 2, 0, 0, 0, 0, 0 };
- uint li = age % 10;
- uint ld = age / 10;
- uint idx;
- if ((li == 0) || (li >= 5 && li <= 9))
- idx = 0;
- else if (li == 1)
- idx = 1;
- else
- idx = 2;
- string[] dn = { "двадцать", "тридцать", "сорок", "пятдесят", "шесдесят" };
- string[] nn = { "", "один", "два", "три", "четрые", "пять", "шесть", "семь", "восемь", "девять" };
- Console.WriteLine("Results: " + dn[ld-2] + " " + nn[li] + " " + ages[idx]);
- */
- // 4-3
- /*
- Console.WriteLine("Type your values:");
- Console.Write(" (1 - R, 2 - D, 3 - L, 4 - S) e = ");
- uint e = uint.Parse(Console.ReadLine());
- Console.Write(" n = ");
- double n = double.Parse(Console.ReadLine());
- double r=0, d=0, l=0, s=0;
- switch (e)
- {
- case 1:
- r = n;
- d = 2 * r;
- l = 2 * Math.PI * r;
- s = Math.PI * Math.Pow(r, 2);
- break;
- case 2:
- d = n;
- r = d / 2;
- l = 2 * Math.PI * r;
- s = Math.PI * Math.Pow(r, 2);
- break;
- case 3:
- l = n;
- r = (l) / (Math.PI * 2);
- d = 2 * r;
- s = Math.PI * Math.Pow(r, 2);
- break;
- case 4:
- s = n;
- r = Math.Sqrt(s / Math.PI);
- d = 2 * r;
- s = Math.PI * Math.Pow(r, 2);
- break;
- }
- Console.WriteLine("Results: r = {0:0.##}, d = {1:0.##}, l = {2:0.##}, s = {3:0.##}",
- r, d, l, s);
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement