Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. public int count7(int n) {
  2.  
  3. if(n==0){
  4. return 0;
  5. }else if((n%10)==7){
  6. return 1 + +count7(n/10);
  7. }else{
  8. return 0 + +count7(n/10);
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement