Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int count5rec(int zahl){
- if (zahl == 0){
- return 0;
- }
- else if (zahl%10 == 5){
- return 1 + count5rec(zahl/10);
- }
- else{
- return count5rec(zahl/10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement