Alx09

Untitled

Jul 1st, 2019
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. using namespace std;
  2. int SC(char s[])
  3. {
  4. if(s[0] == 0) return 0;
  5. else if(s[0] >= '0' && s[0] <= '9') return s[0] - 48 + SC(s+1);
  6. else return SC(s+1);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment