Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string.h>
- using namespace std;
- char A[250];
- int main()
- {
- ifstream f("nevek.in");
- f.getline(A,250);
- cout <<A << endl;
- for(int i=0;i<=250;i++)
- {
- if (A[i]==A[i+1] && A[i]==' ')
- {
- for(int j=i;j<strlen(A);j++)
- A[j]=A[j+1];
- i--;
- }
- }
- A[0]=A[0]-32;
- for(int i=1;i<=250;i++)
- {
- if (A[i]==' ' && A[i+1]!=' ')
- {
- A[i+1]=A[i+1]-32;
- }
- }
- cout <<A << endl;
- f.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement