Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Programmer: Nazmus //Program: Array Tutorial //Website: EasyProgramming.net #include <iostream> #include <string> using namespace std; int main() { string name[5]; int i; for(i=0;i<=4;i++){ cout << "Please enter name: "; cin >> name[i]; } cout << endl; for(i=0;i<=4;i++) { cout << name[i] << endl; } cout << endl; for(i=4;i>=0;i--){ cout << name[i] << endl; } cout << endl; cout << name[2] << ", " << name[4] << ", " << name[0] << endl; system("pause"); }