#include <iostream>
#include <math.h>
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
int n;
cin >> n;
char* string1 = new char[n];
char* string2 = new char[n];
cin >> string1;
cin >> string2;
bool check = true;
if (strlen(string1) != strlen(string2))
cout << "Неверное количество символов";
else
{
for (size_t i = 0; i < round(strlen(string1) / 2); i++) {
if (string1[i] != string2[i]) {
check = false;
}
}
if (check)
cout << "Первые половины равны";
else
cout << "Половины первые не равны";
}
}
Program asd;
uses crt;
var a,b,c,max:integer; r:real;
begin
Write('Введите число A: ');
Readln(a);
Write('Введите число B: ');
Readln(b);
Write('Введите число C: ');
Readln(c);
If a>=b then max:=a
else
max:=b;
If c>max then
max:=c;
r:=a+b+c;
If (A>B) and (B>C) and (C>0) then
Writeln('A= ',a*2,' B= ',b*2,' C= ',c*2);
If (A<0) and (B<0) and (C<0) and (A<>B) and (B<>C) and (C<>A) then
begin
A:=max;
B:=max;
C:=max;
Writeln('A= ',a,' B= ',b,' C= ',c);
end
else
Writeln('Symma: ',r);
end
Объяснение:
Program asd;
uses crt;
var a,b,c,max:integer; r:real;
begin
Write('Введите число A: ');
Readln(a);
Write('Введите число B: ');
Readln(b);
Write('Введите число C: ');
Readln(c);
If a>=b then max:=a
else
max:=b;
If c>max then
max:=c;
r:=a+b+c;
If (A>B) and (B>C) and (C>0) then
Writeln('A= ',a*2,' B= ',b*2,' C= ',c*2);
If (A<0) and (B<0) and (C<0) and (A<>B) and (B<>C) and (C<>A) then
begin
A:=max;
B:=max;
C:=max;
Writeln('A= ',a,' B= ',b,' C= ',c);
end
else
Writeln('Symma: ',r);
end
Компьютерная сеть — система, обеспечивающая обмен данными между вычислительными устройствами — компьютерами, серверами, маршрутизаторами и другим оборудованием или программным обеспечением. Для передачи информации могут быть использованы различные среды.