first commit

This commit is contained in:
Nyagami
2022-12-15 23:51:04 +07:00
commit 87d51fb251
292 changed files with 12623 additions and 0 deletions
@@ -0,0 +1,33 @@
package pkg1.chuan_hoa_xau_ho_ten1;
import java.util.Scanner;
public class Chuan_hoa_xau_ho_ten1 {
static String edit(String s){
String s1 = s.substring(0, 1);
String s2 = s.substring(1, s.length());
s1 = s1.toUpperCase();
return s1+s2;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
sc.nextLine();
while(t>0){
t-=1;
String s = sc.nextLine();
s = s.toLowerCase();
s = s.replaceAll("\\s+", " ");
s = s.trim();
String word[] = s.split("\\s");
for( String i : word){
System.out.print(edit(i)+" ");
}
System.out.println("");
}
}
}