SHARE
TWEET

maj premières lettres et min autres

roronoa Jul 15th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.*;
  2. import java.io.*;
  3. import java.math.*;
  4.  
  5. /**
  6.  * Auto-generated code below aims at helping you parse
  7.  * the standard input according to the problem statement.
  8.  **/
  9. class Solution {
  10.  
  11.     public static void main(String args[]) {
  12.         Scanner in = new Scanner(System.in);
  13.         String[] S = in.nextLine().split(" ");
  14.         String r = "";
  15.         for(String s : S)
  16.         {
  17.             s+= " ";
  18.             String n = "";
  19.             n += s.toUpperCase().charAt(0);
  20.             for(int i = 1; i < s.length(); i++)
  21.                 n += s.toLowerCase().charAt(i);
  22.             r += n.trim() + " ";
  23.         }
  24.         System.out.println(r.trim());
  25.     }
  26. }
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