home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2000 June / APC561.ISO / workshop / c / array.cpp next >
Encoding:
C/C++ Source or Header  |  2000-04-02  |  281 b   |  22 lines

  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.   const int max=100;
  9.   string s[max];
  10.   int count = 0;
  11.  
  12.   while (count<max && !cin.eof())
  13.       cin >> s[count++];
  14.  
  15.   for (int i=0; i<count; i++)
  16.       cout << s[i] << '\n';
  17.  
  18.   return 0;
  19. }
  20.  
  21.  
  22.