东方博宜oj—1100题
缩写
#include <iostream>
#include <string>
using namespace std;
int main()
{
string a;
getline(cin, a);
int i = 0;
if (a[i] > 90)
{
a[i] -= 32;
cout << a[i];
}
else
{
cout << a[i];
}
//
// for (i; i < a.size(); i++)
for (i;i<a.length();i++)
{
if (a[i] == ' ')
{
if (a[i + 1] == ' ')
{
continue;
}
if (a[i + 1] > 90)
{
a[i + 1] -= 32;
cout <<""<< a[i + 1];
}
else
{
cout << a[i + 1];
}
}
}
return 0;
}