返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     ifstream in;
  6.     ofstream out;
  7.     int n;
  8.     string str;
  9.     cin >> n;
  10.     in.open("read.txt");
  11.     out.open("write.txt");
  12.     for(int i=0;i<n;i++)
  13.     {
  14.         getline(in,str);
  15.         out << char(str[0]-'a'+'A');
  16.         for(int j=0;j<str.size();j++)
  17.         {
  18.             if(str[j]==' ')
  19.             {
  20.                 str[j+1]=str[j+1]-'a'+'A';
  21.             }
  22.             out << str[j];
  23.         }
  24.         out << endl;
  25.     }








  26.     return 0;
  27. }
複製代碼

TOP

6.C
7.A
8.C
9.C
10.B
11.D
12.B
13.A
14.B
15.C

TOP

返回列表