ответ:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var
Chislo, Count, Summa, n: integer;
begin
Summa := 0;
Count := 0;
readln(Chislo);
while Chislo > 0 do
n := Chislo mod 10;
if odd(n) then
Summa := Summa + n;
inc(Count);
end;
Chislo := Chislo div 10;
writeln('Сумма нечетных цифр числа: ', Summa);
writeln('Кол-во нечетных цифр числа: ', Count);
writeln('Среднее арифметическое нечетных цифр: ', Summa / Count);
end.
Объяснение:
c++
#include <iostream>
using namespace std;
int main()
{
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
if (a <= d and b <= e or a <= e and b <= d) {
cout << "YES";
}
else if (c <= d and b <= e or c <= e and b <= d) {
else if (c <= d and a <= e or c <= e and a <= d) {
else {
cout << "NO";
return 0;
python
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
if a <= d and b <= e or a <= e and b <= d:
print("YES")
elif c <= d and b <= e or c <= e and b <= d:
elif c <= d and a <= e or c <= e and a <= d:
else:
print("NO")
ответ:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var
Chislo, Count, Summa, n: integer;
begin
Summa := 0;
Count := 0;
readln(Chislo);
while Chislo > 0 do
begin
n := Chislo mod 10;
if odd(n) then
begin
Summa := Summa + n;
inc(Count);
end;
Chislo := Chislo div 10;
end;
writeln('Сумма нечетных цифр числа: ', Summa);
writeln('Кол-во нечетных цифр числа: ', Count);
writeln('Среднее арифметическое нечетных цифр: ', Summa / Count);
end.
Объяснение:
c++
#include <iostream>
using namespace std;
int main()
{
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
if (a <= d and b <= e or a <= e and b <= d) {
cout << "YES";
}
else if (c <= d and b <= e or c <= e and b <= d) {
cout << "YES";
}
else if (c <= d and a <= e or c <= e and a <= d) {
cout << "YES";
}
else {
cout << "NO";
}
return 0;
}
python
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
if a <= d and b <= e or a <= e and b <= d:
print("YES")
elif c <= d and b <= e or c <= e and b <= d:
print("YES")
elif c <= d and a <= e or c <= e and a <= d:
print("YES")
else:
print("NO")
Объяснение: