Advertisement
c_andreea

2009_V95_SII5

Nov 17th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. char x[25],rez[55];
  5. int main()
  6. {
  7.     int i,n;
  8.     cin.getline(x,25);
  9.     n=strlen(x);
  10.     for(i=0;i<n;i++)
  11.     {
  12.         if(x[i-1]==' ')
  13.         {
  14.             strncat(rez,x+i,1);
  15.         }
  16.     }
  17.     strcat(rez,". ");
  18.     strcat(rez,x);
  19.     cout<<rez;
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement