Int P = допустим 20;
int S;
S = P/4 * P/4 ;
возможно не так я не знаю паскаля но алгоритм правельный
Var a,b,i,min,j,sum:longint;
m:array[1..3,1..3] of longint;
begin
for i:=1 to 3 do
for j:= 1 to 3 do
read(m[i,j]);
for i:=1 to 3 do
if m[i,i]< 0 then
begin
for j:=1 to 3 do
sum:=sum+m[i,j];
writeln(i,' ',sum);
sum:=0;
end;
for i:=1 to 3 do
begin
writeln;
for j:= 1 to 3 do
write(m[i,j],' ');
end;
<span>end.</span>
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include <cmath>
using std::pow;
using std::sqrt;
double vpisannayaOkryzhnost(double);
double opisannayaOkryzhnost(double);
int main()
{
double perimeter;
cout << "Vvedite perimeter: ";
cin >> perimeter;
cout << "r vpisannoi okruzhnosti = " << vpisannayaOkryzhnost(perimeter) << endl;
cout << "R opisannoi okruzhnosti = " << opisannayaOkryzhnost(perimeter) << endl;
cin.get();
return 0;
}
double vpisannayaOkryzhnost(double perimeter)
{
double a = perimeter / 4;
return (a / 2);
}
double opisannayaOkryzhnost(double perimeter)
{
double a = perimeter / 4;
return (sqrt(2) / 2 * a);
}
На Гэ-паскале можно написать так:
program math;
var perimeter, a: real;
begin
write('Vvedite perimeter: ');
read(perimeter);
a := perimeter / 4;
writeln('r vpisannoi okruzhnosti = ', a / 2:0:2);
writeln('R opisannoi okruzhnosti = ', sqrt(2) / 2 * a:0:2);
readln();
readln();
end.
1.
1) A + B (складываем)
2) A+B/2 (находим полусумму)
2.
1)A-C ( вычитаем)
2) найти модуль A-C
3.
1)B*C ( умножаем)
2) B*C возводим в квадрат
#include <iostream>
using namespace std;
int main()
{
int N, temp, min_temp = 1000;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> temp;
if (temp < min_temp) {
min_temp = temp;
}
}
cout << min_temp << endl;
if (min_temp < -15) cout << "YES"; else cout << "NO";
}