/C06014 - Chuẩn hóa xâu họ tên 1
<Problem>
https://code.ptit.edu.vn/student/question/C06014#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <ctype.h>
int main() {
int t;
scanf("%d", &t);
getchar();
while (t--) {
char s[200];
gets(s);
char arr[100][100];
int n = 0;
const char* delim = " ";
char* token = strtok(s, delim);
while (token != NULL) {
token[0] = toupper(token[0]);
for (int i = 1; i < strlen(token); i++) {
token[i] = tolower(token[i]);
}
strcpy(arr[n++], token);
token = strtok(NULL, delim);
}
for (int i = 0; i < n; i++) {
printf("%s ", arr[i]);
}
printf("\n");
}
return 0;
}