SHARE
TWEET

Untitled

a guest Apr 26th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. public class AltifLiad {
  3.  
  4.     public static void main(String[] args) {
  5.         String str="Liad Altif";
  6.         System.out.println(NoCapsStr(str));
  7.     }
  8.     public static int NoCapsStr(String str)
  9.     {
  10.         if (str.length()==0)
  11.             return 0;
  12.        
  13.         if (str.charAt(str.length()-1)>='a'&&str.charAt(str.length()-1)<='z')
  14.             return NoCapsStr(str.substring(0,str.length()-1))+1;
  15.        
  16.         return NoCapsStr(str.substring(0,str.length()-1))+ 0;
  17.        
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top