Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int count8(int n) {
- int count = 0;
- if(n<8)
- return 0;
- if(n%100==88) {
- count =2;
- }else if(n%10==8){
- count =1;
- }else{
- count = 0 ;
- }
- return count+count8(n/10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement