koren27
08.04.2021 10:44

Сделайте щяс мне очень Умоляю прям быстро накину кто сделает


Сделайте щяс мне очень Умоляю прям быстро накину кто сделает

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
arinahomich05
09.04.2021 05:43
Const e=0.001;
var x,xn,h,an,s,f,y:real; n,k,i:integer;
begin
n:=10;
h:=(1-0.1)/(n-1);
x:=0.1-h;
for i:=1 to n do
 begin
 x:=x+h; an:=1;
 xn:=1; f:=1;
 k:=0;  s:=1;
 while an>e do
  begin
  xn:=xn*x*x;
  k:=k+1;
  f:=f*k;
  an:=(2*k+1)*xn/f;
  s:=s+an;
  end;
 y:=(1+2*x*x)*exp(x*x);
 writeln('x = ',x:4:1,'  s = ',s:6:4,'  y = ',y:6:4);
 end;
end.

Результат:
x = 0.1  s = 1.0303  y = 1.0303
x = 0.2  s = 1.1241  y = 1.1241
x = 0.3  s = 1.2911  y = 1.2911
x = 0.4  s = 1.5490  y = 1.5490
x = 0.5  s = 1.9260  y = 1.9260
x = 0.6  s = 2.4653  y = 2.4653
x = 0.7  s = 3.2320  y = 3.2320
x = 0.8  s = 4.3240  y = 4.3240
x = 0.9  s = 5.8894  y = 5.8895
x = 1.0  s = 8.1548  y = 8.1548
0,0(0 оценок)
Ответ:
superg64745
11.03.2022 18:54

#include <iostream>

using namespace std;

class circle {

public:

   int x, y;

   double r, s;

   circle()

   {        

       x = 0;

       y = 0;

       r = 0;  

   }

   circle( int a = 0, int b = 0, double c = 0 )

   {

       set(a, b, c);        

   }

   void out()

   {

       cout << "Координаты: (" << x << ", " << y << ") Радиус: "<< r << " Площадь: " << endl;        

   }

   void set(int a, int b, double c)

   {

       x = a;

       y = b;

       r = c;

   }    

   void calculate() {

       s = r * r * 3.14159;        

   }

};

 

class sphere : public circle {

private:

   double  v;

   void calculate() {      

       s = 4 * 3.14 * r * r;  

       v = 3.14159 * pow(r, 3);

   }    

public:

   sphere();

   sphere() : circle(circle, double = 1.0);

   sphere (int = 0, int  = 0, double = 1.0) ;

 

 

 

void out()

   {

       circle::out();

       cout << ", радиус: " << r << ", длина: " << ", площадь: " << s;        

   }

};

int main(){

   setlocale(LC_ALL, "ru");

   circle a(2, 15, 4);

   a.out();

   sphere b;

 

   

   system("pause");

   return 0;

}

Объяснение: пойдёт?

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