snezhanakosola
04.01.2021 00:32

На заданном интервале 9m,n, найти сумму чисел

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Истар
10.08.2022 07:06

1)

#include <iostream>

#include <math.h>

using namespace std;

int main() {

setlocale(LC_ALL, "Russian");

float x, y;

cout << "Введите х:";

cin >> x;

if (x <= 0) {

 y = 3 * sin(x) - pow(cos(x), 2) * x;

 cout << y;

}

else if (x > 0) {

 y = sqrt(1 + pow(x, 2));

 cout << y;

}

else {

 y = log(x + 5);

 cout << y;

}

return 0;

}

2)

#include <iostream>

#include <math.h>

using namespace std;

int main() {

setlocale(LC_ALL, "Russian");

float x, f;

cout << "Введите х:";

cin >> x;

if (x < 0) {

 f = 3/pow((x-3),2);

 cout << f;

}

else if (0<=x<=2) {

 f = x-1;

 cout << f;

}

else if(x>2) {

 f = log(x);

 cout << f;

}

return 0;

}

Объяснение:

0,0(0 оценок)
Ответ:
Polk1512
27.01.2021 23:31

1)

#include <iostream>

#include <math.h>

using namespace std;

int main() {

setlocale(LC_ALL, "Russian");

float x, y;

cout << "Введите х:";

cin >> x;

if (x <= 0) {

 y = 3 * sin(x) - pow(cos(x), 2) * x;

 cout << y;

}

else if (x > 0) {

 y = sqrt(1 + pow(x, 2));

 cout << y;

}

else {

 y = log(x + 5);

 cout << y;

}

return 0;

}

2)

#include <iostream>

#include <math.h>

using namespace std;

int main() {

setlocale(LC_ALL, "Russian");

float x, f;

cout << "Введите х:";

cin >> x;

if (x < 0) {

 f = 3/pow((x-3),2);

 cout << f;

}

else if (0<=x<=2) {

 f = x-1;

 cout << f;

}

else if(x>2) {

 f = log(x);

 cout << f;

}

return 0;

}

Объяснение:

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