#include<iostream>
#include<string>
using namespace std;
void chuhoa(char *s);
int main()
{
char a[100];
cout << "Hay nhap vao chuoi cua ban: ";
cin >> a;
cout << "Ket qua la: ";
chuhoa(a);
return 0;
}
void chuhoa(char *s)
{
s[0] = toupper(s[0]);
while (strstr(s, " ") != NULL)
{
s = strstr(s, " ") + 1;
s[0] = toupper(s[0]);
}
puts(s);
}
Không có nhận xét nào:
Đăng nhận xét