Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1.  
  2. public class Aufgabe1 {
  3. static int qs(int n)
  4. {
  5.  
  6. if(n<10)
  7. {
  8.  
  9. return n;
  10. }
  11. if(n>10)
  12. {
  13. n = n%10 + qs(n/10);
  14. }
  15.  
  16. return n;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement