#include <iostream>
#include<math.h>
using namespace std;
int main() {
    int n=12345;
    cout<<floor(log10(n))+1;
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: