Advertisement
Codefox

Untitled

Nov 6th, 2013
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. int quersumme(int z) {
  2.     int sum = 0;
  3.     while (z > 0) {
  4.         sum += z % 10;
  5.         z /= 10;
  6.     }
  7.     return sum;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement