Предмет: Информатика, автор: Mashironchan

помогите составить программу на языке паскаль:
Вычислить значение выражения: f(x)=ctg 3x*log(2x+3)*4 при любых значениях х.
Прошу 16 баллов!

Ответы

Автор ответа: Аноним
0
Первый вариант: если десятичный логарифм от (2x+3).

Var X:real;
Begin
Write('x = ');ReadLn(x);
if x<=-1.5 then WriteLn('Ошибка: Нельзя вычислить логарифм от нуля!')
else if x = 0 then WriteLn('Ошибка: На ноль делить нельзя!')
     else WriteLn('f(',x,') = ',Ln(2*x+3)*4/(Tan(3*x)*Ln(10)))
End.



Второй вариант: если логарифм по основанию (2x+3) от 4.

Var X:real;
Begin
Write('x = ');ReadLn(x);
if x<=-1.5 then WriteLn('Ошибка: Основание логарифма должно быть больше нуля!')
else if x = 0 then WriteLn('Ошибка: На ноль делить нельзя!')
     else WriteLn('f(',x,') = ',Ln(4)/(Tan(3*x)*Ln(2*x+3)))
End.
Похожие вопросы
Предмет: Математика, автор: Аноним
Предмет: Английский язык, автор: qwerty6790
Раскройте скобки, употребляя глаголы в Present Continuous, Present Simple , Future Simple .Обратите внимание на порядок слов в вопросительном предложении и не забудьте о вспомогательном глаголе
1 You (to read ) a book now? 2 You (to read ) books every evening? 3 How long you ( to learn) this poem to the next English lesson? 4 At what time you (to get up) usually? 5 At what time you (to get up) next week-end? 6 Where you (to go) now? 7 Look, Mary (to cross) the street now. 8 She (to cross) this street every morning, when she (to go) to her school.9 My parents ( to visit) theatre tomorrow and I ( to stay) with little sister. 10.My brother ( to play) guitar well, but I (not| to play) guitar, I ( play) football well. 11 We (not to go) to the zoo tomorrow.12 You (to go) to this exhibition with me next Sunday? 13 He (not to learn) the poem now, he (to watch) TV. 14 My sister (not to like) coffee, she (to prefer) green tea. 15 This children always (to help) their grandmother and (to take care) of her.16 The relationships between all members of our family (to be) closer in the future. 17. My Granny (to live) independent life in her own home and (to be) happy.18 What presents your Granny (to receive)for her last birthday? 19 Look, he (to sit) in the armchair on this photo. 20 He (to sit) in this armchair near the fireplace every evening. 21 My sister (to know) English well but she (to learn) German in the future.22 How many foreign languages (to know) you?