Var
N,A:integer;
Begin
Write('N = ');Read(N);
A:=0;
While N>0 do
Begin
if (N mod 10) > A then A:= N mod 10;
N:=N div 10;
End;
Write(A)
End.
Var
N,A,B:integer;
C:boolean;
Begin
Write('N = ');Read(N);
A:=-1;
B:=-2;
C:=false;
While N>0 do
Begin
if A=B then C:=true;
if N>0 then
Begin
A:=N mod 10;
N:=N div 10;
End;
if A=B then C:=true;
if N>0 then
Begin
B:=N mod 10;
N:=N div 10;
End;
End;
if A=B then C:=true;
if C then Write('Есть')
else Write('Нет')
End.
Подробнее - на -
Объяснение:
#include <iostream>
#include <vector>
#include <set>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (b > c){
swap(b, c);
}
if (a > c){
swap(a, c);
}
if (a + b <= c){
cout << "impossible";
}else if (c * c == a * a + b * b){
cout << "rectangular";
} else if (a * a + b * b < c * c){
cout << "obtuse";
} else if (a * a + b * b > c * c){
cout << "acute";
}
}