All pastes #895509 Raw Edit

Array and for loop

public cpp v1 · immutable
#895509 ·published 2008-02-07 21:44 UTC
rendered paste body
//array exercise#include <iostream>#include <string>using namespace std;string array[10];int main(){    cout << "What?\n";    for (int i = 0;i <= 9;i++)    {        cin >> array[i];        cout << "now what?\n";    }    for (int j = 0;j <= 9;j++)    {            cout << "You said:";            cout << array[j] << endl;    }    return 0;}