Untitled
#include <iostream> using namespace std; int b(int a) { int i = 1; while ((a /= 10) > 0) { i++; } return i; } int main() { int a; cin >> a; cout << b(a); }
Leave a Comment
#include <iostream> using namespace std; int b(int a) { int i = 1; while ((a /= 10) > 0) { i++; } return i; } int main() { int a; cin >> a; cout << b(a); }