Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. public static int count5rec(int zahl){
  2. if (zahl == 0){
  3. return 0;
  4. }
  5. else if (zahl%10 == 5){
  6. return 1 + count5rec(zahl/10);
  7. }
  8. else{
  9. return count5rec(zahl/10);
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement