Anyazz
17.04.2023 19:09

Рассчитать значение функции y=5x^2+x^2-7x-30 для значений аргумента 0; 1; 1,5; 6; -4
program функция;
var a, b, c, d, e, x1, y1: real;
procedure fun (var x, y: real) ;
begin
y1 : =5*x*sqr(x)+sqr(x) - 7*x-30;
end;
begin
read (a, b, c, d, e);
fun (a, y1) ;
write (y1) ;
fun (b, y1) ;
write (y1) ;
fun (c, y1) ;
write (y1) ;
fun (d; y1) ;
write (y1) ;
fun (e, y1) ;
write (y1) ;
end.

заранее !

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
asdldks
01.03.2021 01:58

Первая задачка:

#include <iostream>

#include <ctime>

using namespace std;

int main() {

setlocale(LC_ALL, "rus");

srand(time(NULL));

int x,sr1,sr2,sr=0;

for (int i = 0; i < 3; i++) {

 for (int i = 0; i < 10; i++) {

  x = 1 + rand() % 10;

  sr += x;

  cout << x << " ";

 }

 cout << endl;

 cout << "Среднее арифметическое этой последовательности: " << sr / 10;

 cout << endl;

}

return 0;

}

Вторая задачка:

#include <iostream>

#include "math.h"

using namespace std;

int main() {

int n;

double s=0,x;

cin >> n >> x;

for (int i = 1; i <= n; i++) {

 s += sin(pow(x, i));

}

cout << s;

return 0;

}

0,0(0 оценок)
Ответ:
TreYsYer
01.03.2021 01:58

Первая задачка:

#include <iostream>

#include <ctime>

using namespace std;

int main() {

setlocale(LC_ALL, "rus");

srand(time(NULL));

int x,sr1,sr2,sr=0;

for (int i = 0; i < 3; i++) {

 for (int i = 0; i < 10; i++) {

  x = 1 + rand() % 10;

  sr += x;

  cout << x << " ";

 }

 cout << endl;

 cout << "Среднее арифметическое этой последовательности: " << sr / 10;

 cout << endl;

}

return 0;

}

Вторая задачка:

#include <iostream>

#include "math.h"

using namespace std;

int main() {

int n;

double s=0,x;

cin >> n >> x;

for (int i = 1; i <= n; i++) {

 s += sin(pow(x, i));

}

cout << s;

return 0;

}

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота