Регистрация Вход
Информатика 10 - 11 классы Варвара
Решено

Подскажите как, пожалуйста, решить

1. using System; public class Test { public static void Main() {
229
ОТВЕТЫ
1.
using System;

public class Test
{
public static void Main()
{
 int a,b;
 Console.Write("a = ");
 a = int.Parse(Console.ReadLine());
 Console.Write("b = ");
 b = int.Parse(Console.ReadLine());
 if (agt;b) Console.WriteLine("{0} gt; {1}", a, b);
 else if (alt;b) Console.WriteLine("{0} lt; {1}", a, b);
 else Console.WriteLine("{0} = {1}", a, b);
 Console.ReadLine();
}
}

Пример:
a = 15
b = 28
15 lt; 28

2.
using System;

class Program
{
public static void Main()
{
double y1, y2, h = 10;
Console.WriteLine("x  sin(x)  cos(x)");
for (double x = 0; x lt;= 90; x = x+h) {
y1 = Math.Sin(x*Math.PI/180);
y2 = Math.Cos(x*Math.PI/180);
Console.WriteLine("{0} {1:0.0000} {2:0.0000}",x,y1,y2);
}
        Console.ReadKey();
}
}

Результат:
x sin(x) cos(x)
0 0.0000 1.0000
10 0.1736 0.9848
20 0.3420 0.9397
30 0.5000 0.8660
40 0.6428 0.7660
50 0.7660 0.6428
60 0.8660 0.5000
70 0.9397 0.3420
80 0.9848 0.1736
90 1.0000 0.0000
70
Отв. дан
Для написания вопросов и ответов необходимо зарегистрироваться на сайте