chapaevval
?>

Pascal как сделать так, что при нажатии клавиши "2" появлялась картинка

Информатика

Ответы

mdsazonovatv1173

#include <iostream>

#include <math.h>

using namespace std;

int x,y,sumSquared,sumOfSquares;

int main() {

  cout <<"Введите x" << endl;

  cin >> x ;

  cout << "Введите y"<< endl;

  cin >> y;

sumSquared = pow(x*y,2);

  cout << "Сумма квадратов:";

  cout << sumSquared ;

  cout << "\n";

sumOfSquares = pow(x,2)+pow(y,2);

  cout << "Квадрат суммы:";

  cout << sumOfSquares ;

  cout << "\n";

  if (sumSquared > sumOfSquares){

      cout << "Сумма квалратов больше чем квадрат суммы";

      cout << "\n";

      cout << "ответ:";

      cout << sumSquared << endl;

  }

  else  {

      cout << "Квадрат суммы больше чем сумма квадратов";

      cout << "\n";

      cout << "ответ:";

      cout << sumOfSquares << endl;

  }

}

Объяснение:

Квадрат суммы:  (x + y)^2

Сумма квадратов: x^2 + y^2

Ну вроде бы правильно сделал ))

horst58

Часть 1

1.

a, b, c, d = int(input()), int(input()), int(input()), int(input())

s = (a + b + c + d)/4

print(s)

2.

x, y = int(input()), int(input())

t = x

x = y

y = t

print(x, y, sep = "\n")

4.

from math import pi

L, D = float(input()), float(input())

R = (L - D) / (2 * pi)

print(R)

5.

from math import pi

R1, R2 = float(input()), float(input())

r = R1**2 - R2**2

S = pi * r

print(S)

6.

x, y = int(input()), int(input())

S = (2*x - y)*(x - y)

print(S)

Часть 2

1.

x, y = float(input()), float(input())

x, y = y, x

print(x, y)

2.

если нужно найти y = x * 5:

x = int(input())

y = x * 5

print(y)

если нужно найти y = x^{2}:

x = int(input())

y = x ** 5

print(y)

3.

x = int(input())

y = 1 - 2*x + 3*x**2 - 4*x**3

print(y)

4.

x1, y1, x2, y2 = float(input()), float(input()), float(input()), float(input())

from math import sqrt

S = sqrt((x1 - x2)**2 + (y1 - y2)**2)

print(S)

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Pascal как сделать так, что при нажатии клавиши "2" появлялась картинка
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

taa19707470
S.V. Zhoraevna1677
KosarinPotemkina1888
Александрович Василий
5div 6 6 div 3 154 div 17 132 mod 8 167 mod 17 177 div 6
vera-sherepa231
panasenko68
Korikm
dvpered
krtatiana69
ogonizoloto
ValerevnaRustam1072
mekap22044
sorokinae
rsd737