MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/questions/count_digit.cpp:9–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#define endl '\n'
8
9int main(){
10 cin.tie(0)->sync_with_stdio(0);
11 int n;
12 cin>>n;
13 int count=0;
14 while(n>0){
15 count++;
16 n/=10;
17 }
18 cout <<"total digit in number is: "<< count << endl;
19 return 0;
20}
21
22

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected