|
|
1 month ago | |
|---|---|---|
| wer | 1 month ago | |
| .gitignore | 1 month ago | |
| README.md | 1 month ago | |
| wer.sln | 1 month ago |
1
: using System;
class Program {
static void Main()
{
Console.WriteLine(" :");
int a = int.Parse(Console.ReadLine());
int b = int.Parse(Console.ReadLine());
int c = int.Parse(Console.ReadLine());
int resultA = Math.Pow(a, a >= 0 ? 2 : 4);
int resultB = Math.Pow(b, b >= 0 ? 2 : 4);
int resultC = Math.Pow(c, c >= 0 ? 2 : 4);
Console.WriteLine($":");
Console.WriteLine($"a = {a:F2} ? {resultA:F2}");
Console.WriteLine($"b = {b:F2} ? {resultB:F2}");
Console.WriteLine($"c = {c:F2} ? {resultC:F2}");
}
}
: : 1 2 4 : a = 1,00 ? 1,00 b = 2,00 ? 4,00 c = 4,00 ? 16,00
2
: using System;
class Program {
static void Main()
{
Console.WriteLine(" (x1 y1):");
string[] input1 = Console.ReadLine().Split();
double x1 = double.Parse(input1[0]);
double y1 = double.Parse(input1[1]);
Console.WriteLine(" (x2 y2):");
string[] input2 = Console.ReadLine().Split();
double x2 = double.Parse(input2[0]);
double y2 = double.Parse(input2[1]);
//
double dist1Sqr = x1 * x1 + y1 * y1; //
double dist2Sqr = x2 * x2 + y2 * y2; //
//
Console.WriteLine($" 1 : {Math.Sqrt(dist1Sqr):F2}");
Console.WriteLine($" 2 : {Math.Sqrt(dist2Sqr):F2}");
//
if (dist1Sqr < dist2Sqr)
{
Console.WriteLine(" 1 .");
}
else if (dist1Sqr > dist2Sqr)
{
Console.WriteLine(" 2 .");
}
else
{
Console.WriteLine(" .");
}
}
}
: (x1 y1): 2 5 (x2 y2): 4 7 1 : 5,39 2 : 8,06 1 .
3
: using System;
class Program {
static void Main()
{
Console.WriteLine(" ( ):");
Console.Write(" : ");
double angle1 = double.Parse(Console.ReadLine());
Console.Write(" : ");
double angle2 = double.Parse(Console.ReadLine());
// ,
if (angle1 <= 0 || angle2 <= 0)
{
Console.WriteLine(" ( ).");
return;
}
//
double angle3 = 180 - angle1 - angle2;
// ,
if (angle3 <= 0)
{
Console.WriteLine(" ( 180).");
return;
}
Console.WriteLine($" : {angle3:F2}");
// ,
if (Math.Abs(angle1 - 90) < 1e-6 || Math.Abs(angle2 - 90) < 1e-6 || Math.Abs(angle3 - 90) < 1e-6)
{
Console.WriteLine(" .");
}
else
{
Console.WriteLine(" , .");
}
}
}
: ( ): : 46 : 87 : 47,00 , .
7
: using System;
class Program {
static void Main()
{
int a = int.Parse(Console.ReadLine());
int b = int.Parse(Console.ReadLine());
int c = int.Parse(Console.ReadLine());
int min = Math.Min(Math.Min(a, b), c);
int max = Math.Max(Math.Max(a, b), c);
int sum = min + max;
Console.WriteLine($": {min}");
Console.WriteLine($": {max}");
Console.WriteLine($": {sum}");
}
}
: 4 8 3 : 3 : 8 : 11