Advertisement
a3f

Digits

a3f
Nov 27th, 2013
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <cmath>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5. int main ()
  6. {
  7. int input, digits;
  8. cin >> input;
  9. digits = floor(log10(input)) + 1;
  10. cout << "3adad el 5anat: " << digits;
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement