#include
#include
using namespace std;
struct point
{
int x;
int y;
};
int foo(point a, point b)
{
return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2))
}
int main()
{
int a1,a2,a3;
point b[3];
for(int i = 0; i < n; i++)
cin >> b[i].x >> b[i].y;
a1 = foo(b[0],b[1]);
a2 = foo(b[0),b[2];
a3 = foo(b[1],b[2]);
if(a1==a2 && a2==a3)
{
cout << "Равносторонний";
return 0; }
if((a1==a2 && a2 != a3) || (a2==a3 && a2!=a1) || (a1==a3 && a1!=a2))
{
cout << "Равнобедренный";
return 0;}
int m = max(max(a1,a2),max(a2,a3));
int m2 = min(min(a1,a2),min(a2,a3));
int m3 = (a1+a2+a3)-(m1+m2);
if(pow(m,2==pow(m2,2)+pow(m3,2)
{
cout << "Прямоугольный";
return 0;
}
cout << "Обычный";
}
Program E10;
uses crt;
var
i: integer;
S: string;
begin
writeln('Введите строку: ');
readln(S);
for i:=1 to length(S) do
if S[i] = 'о' then
S[i]:='и';
writeln('Вывод: ',S)
<span>end.
Не знаю конечно но может так..
</span>
program Positiv;
var i:integer; x,sum:real;
begin
sum:=0;
for i:=1 to 10 do
begin
write('введите ',i,'-е число: ');
readln(x);
if x>0 then sum:=sum+x;
end;
writeln('Cумма положительных чисел равна ',sum);
end.
Зона с охватом Wi-Fi ну как то так
Using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Brainly1
{
class Program
{
static void Main(string[] args)
{
bool Mistake = false;
int N = 0;
do
{
Console.Write("Введите количество слагаемых: ");
try
{
N = Convert.ToInt32(Console.ReadLine());
Mistake = false;
}
catch (FormatException)
{
Mistake = true;
Console.Clear();
Console.WriteLine("Неверный формат ввода! Повторите попытку!");
Console.WriteLine();
}
}
while (Mistake == true);
Sum(N);
}
static void Sum(int N)
{
double[] Elements = new double[N];
double Result = 0;
for (int i = 0; i < N; i++)
{
Console.WriteLine();
Console.Write("Введите " + (i + 1) + " число: ");
try
{
Elements[i] = Convert.ToDouble(Console.ReadLine());
}
catch (FormatException)
{
Console.WriteLine("Неверный формат ввода!");
}
}
for (int j = 0; j < N; j++)
{
Result += Elements[j];
}
Console.WriteLine();
Console.Write("Сумма = " + Result);
Console.ReadKey();
}
}
}