Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int LICZBA_CYFR(int n)
- {
- int x=0;
- for(n; n>0; n=n/10)
- {
- x++;
- }
- return x;
- }
- int main()
- {
- cout << LICZBA_CYFR(546) << endl;
- cout << LICZBA_CYFR(90909090) << endl;
- cout << LICZBA_CYFR(24176) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement