Есть ответ 👍

помагите лайк поставлю​

282
326
Посмотреть ответы 1

Ответы на вопрос:


uses crt;

var x, res: real;

funcNum: byte;

begin

   write('X = ');

   readln(x);

   

   writeln();

   TextColor(1);

   writeln('  1 - sin(x)');

   TextColor(2);

   writeln('  2 - cos(x)');

   TextColor(3);

   writeln('  3 - tg(x)');

   TextColor(4);

   writeln('  4 - ctg(x)');

   TextColor(7);

   writeln();

   

   write('Введите номер функции: ');

   readln(funcNum);

   case funcNum of

       1:

           begin

               TextColor(1);

               res := sin(x);

           end;

       2:

           begin

               TextColor(2);

               res := cos(x);

           end;

       3:

           begin

               TextColor(3);

               res := sin(x) / cos(x);

           end;

       4:

           begin

               TextColor(4);

               res := cos(x) / sin(x);

           end;

   end;

   TextColor(7);

   

   writeln(res);

end.

Популярно: Информатика