Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- import java.math.*;
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- class Solution {
- public static void main(String args[]) {
- Scanner in = new Scanner(System.in);
- String[] S = in.nextLine().split(" ");
- String r = "";
- for(String s : S)
- {
- s+= " ";
- String n = "";
- n += s.toUpperCase().charAt(0);
- for(int i = 1; i < s.length(); i++)
- n += s.toLowerCase().charAt(i);
- r += n.trim() + " ";
- }
- System.out.println(r.trim());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement