Аноним1418
21.03.2021 19:12

Надо выписать самое главное

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
pragravra
20.06.2020 09:22
//1

 <script type="text/javascript">
   var ans=prompt('Name a vegetable that is green on the outside and  white on the inside. It starts with C.','answer');
   if(ans=='Cucumber')
         alert('Congratulations, answer is right!');
         else
        alert('Wrong answer');
   alert('Game over');
 </script>

//2
 <script type="text/javascript">
   var count=0;
   var ans=prompt('Name a vegetable that is green on the outside and  white on the inside. It starts with C.','answer');
   if(ans=='Cucumber')
         count=count+1;
   ans=prompt('Name a tiny, round green vegetable that grows in pods. It starts with P. Children like it.','answer');
   if(ans=='Peas')
         count=count+1;
   ans=prompt('What goes up when the rain comes down?','answer');
   if(ans=='Umbrella')
         count=count+1;
   ans=prompt('I am purple, yellow, red,/and green./The King cannot reach me and neither can the Queen./I show my colours after the rain,/And only when the sun comes out again.','answer');
   if(ans=='Rainbow')
         count=count+1;
   alert('Count of right answers:'+count);
   alert('Game over');
 </script>
0,0(0 оценок)
Ответ:
ssnn70p0aegz
19.02.2023 12:39

Складіть програму мовою С++ для знаходження функції y(x), де x Є [a, b] з кроком h. Дані для y(x), a, b, h вказані в таблиці.

y = x + sin(3x);

[a, b], h   [-1, 3], h = 0.3

Програма:

С++:

#include <iostream>

#include <cmath>

using namespace std;

int main()

{

   float y, a, b, h;

   cout << "a = ";  cin >> a;

   cout << "b = ";  cin >> b;

   cout << "h = ";  cin >> h;

   while (a <= b) {

       y = a + sin(3 * a);

       cout << "y = " << y << " при x = " << a << endl;

       a += h;

   }

}

Результат:

a = -1

b = 3

h = 0.3

-1.14112 при x = -1

-1.56321 при x = -0.7

-1.33204 при x = -0.4

-0.39552 при x = -0.1

0.764643 при x = 0.2

1.4975 при x = 0.5

1.47546 при x = 0.8

0.942254 при x = 1.1

0.528424 при x = 1.4

0.774186 при x = 1.7

1.72058 при x = 2

2.87844 при x = 2.3

3.59854 при x = 2.6

3.56297 при x = 2.9

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