Untitled
unknown
c_cpp
2 years ago
319 B
9
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);
}
Editor is loading...
Leave a Comment