Untitled
unknown
c_cpp
10 months ago
319 B
2
Indexable
#include <iostream> #include <cmath> using namespace std; int col(int a) { int col = 0; if (a == 0) { col++; cout << col; } else { while (a != 0) { a /= 10; col++; } cout << col; } return col; } int main() { setlocale(LC_ALL, "Russian"); int a; cin >> a; col(a); }
Leave a Comment