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

Составьте программу вычисления значений функции y=-sin2x на отрезке [-1, 2] с шагом 0.2. Результат представьте в виде таблицы, первый столбец которой включает в себя значения аргумента, второй — соответствующие значения функции.


kornickevg: На каком языке?
krivtsovkirya: pascal
kornickevg: Sin(2x) или sin^2(x)?
kornickevg: Готово для 2х
kornickevg: Подходит?
kornickevg: Нет ответа-отправляю с 2х

Ответы

Автор ответа: kornickevg
0

program sin2x_na1_2_hag02;

var

x,y:real;

begin

x:=-1;

writeln('--------------------');

writeln('| x | y |');

writeln('--------------------');

while x<=2 do

begin

y:=-sin(2*x);

writeln('|',x:5:2,' |',y:9:2,'|');

writeln('--------------------');

x:=x+0.2;

end;

end.

Приложения:
Похожие вопросы
Предмет: Английский язык, автор: AnonymousA

помогите сделать задание) Ответы можно написать например так(1-а, 2-b) Choose the correct variant.

1)He decided to go to the office immediately when he remembered he __________ the door. a) didn’t lock b) had not locked c)have not locked

2) He has tested four new machines since he __________ the company. a) joined b) had joined c) has joined

3) When he installed the new equipment, it __________ already obsolete. a) became b) had become c) has become

4)While we were seeking a new solution, they __________ everything to change our plans. a) had done b) were doing c) did

5)When she took her driving test, she __________ about 10 driving lessons. a) had had b) had c) was having

6)The hotel manager called the police when he discovered that a guest __________ without paying a fill. a) left b) had left c) leaves

7)He __________ in the laboratory when you rang. a) worked b) was working c) had worked

8)Phil __________ to someone on the phone as we walked in. a) talked b) was talking c) had talked

9)I __________ the report since early morning when suddenly he came. a) was reading b) had been reading c) read

10)We __________ the main office before we moved into it. a) were reconstructing b) reconstructed c) had reconstructed

11)She always __________ formal clothes to work. a) was wearing b) were c) had been wearing

12)He __________ for 10 years at his telephone business, before he decided it was time for a change. a) worked b) was working c) had been working

13)He developed his business plan later than we __________ . a) expected b) had expected c) have expected

14)Last year they __________ their business into two. a) divide b) divided c) have divided

15)He __________ a very rich man when he was just 25. a) became b) has become c) was becoming