Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
Доброго времени суток, если возникнут во ко коду, буду рад на них ответить
#include <iostream>
#include <string>
int main()
{
std::string str;
std::cin >> str;
int counter = 0;
for (const auto& s : str)
if (std::isdigit(s))
++counter;
}
std::cout << "There is(are) " << counter << " digit(s) in the line\n";
system("pause");
return 0;
04₁₀ = 100₂
10₁₀ = 1010₂
1996₁₀ = 11111001100₂
# include < stdio.h> int phi(int x){int i,k=0; if(x> 1)k+=phi(x-1)+phi(x-2); if(x< 2)k=x; return k; } int main (void){int x; scanf("%d",& x); printf("%d",phi(x)); return 0; }
Популярные вопросы