Guest User

Untitled

a guest
Nov 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     char string1[256], temp[256];
  6.     cin.getline (f,256);
  7.     char *string2[256];
  8.     int i, j, m;
  9.     i = 0;
  10.     j = 0;     
  11.     for(j; string1[i] != '\0'; j++)
  12.     {
  13.         m = 0;
  14.         if(temp[i] == '\0')
  15.             i++;
  16.         do
  17.         {
  18.             temp[m] = string1[i];
  19.             m++;
  20.             i++;
  21.         }
  22.         while((f[i] != ' ') || (f[i] != '\0'));
  23.         temp[m] = '\0';
  24.         cout << temp << endl;
  25.         string2[j]  = temp;
  26.         cout << string2[j] << endl;
  27.     }
  28. }
Add Comment
Please, Sign In to add comment