Т. к. а не может быть одновременно быть больше 1000 и меньше 100, никогда не выйдет 'Ошибка'
1)
полученные числа:
0 1 2 3 4 5 4 3 2 1 0
2)
10
3)
10 9 8 7 6 5 4 3 2 1 0
4)
10 9 8 7 6 5 6 7 8 9 10
5)
полученные числа:
1 0 3 2 5 4 7 6 9 8 10
С++
#include <iostream>
using namespace std;
bool Election(int a,int b,int c)
{
int t=0,f=0;
if(a==true)
t++;
else
f++;
if(b==true)
t++;
else
f++;
if(c==true)
t++;
else
f++;
if(t>f)
return TRUE;
else
return FALSE;
}
void main()
{
bool x,y,z;
cin>>x,y,z;
cout<< Election(x,y,z) <<endl;
system("pause");
}
Первые два вчера писал: znanija.com/task/1944982
В третьем не уверен в самом алгоритме...
var
a, b, x, y, z : real;
begin
read (a, b, c, x, y);
if ((a <= x) and (b <= y)) or ((a <= y) and (b <= x))
or ((a <= x) and (b <= z)) or ((a <= z) and (b <= x))
or ((a <= z) and (b <= y)) or ((a <= y) and (b <= z)) then writeln ('YES') else writeln ('NO');
end.