#include <iostream>
using namespace std;
int main(){
String str;
int count=0;
cin>>str;
for(int i=0;i<str.length();i++){
if(str.at(i)==0||str.at(i)==1||str.at(i)==2||str.at(i)==3||str.at(i)==4||str.at(i)==5||str.at(i)==6||str.at(i)==7||str.at(i)==8||str.at(i)==9){
count++;
}
}
cout<<count;
}
В двоичной системе получается 1100100
Ответ: 3
С++
#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");
}
Рота Нота Нора Пора Пола Полк
Бант Кант Карт Корт Кора Коса
Бег Бог Бок Бак Бас Бал Бар Шар Шаг Море Горе Гора Пора Кора Кара Каша Саша Суша
Миг Мир Пир Пар Бар Бас Бес Вес Век
Ответ: 10101011=171
10101011
С конца 1=1, 1=2, 0=0, 1=8, 0=0, 1=32, 0=0, 1=128 и все это сложи.
128+32+8+2+1=171