Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int broj_na_cifri(int a)
- {
- if(a==0)
- return 1;
- int broj=0;
- while(a>0)
- {
- broj++;
- a=a/10;
- }
- return broj;
- }
- int main()
- {
- int a;
- cin>>a;
- cout<<broj_na_cifri(a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement