please tell what am I doing wrong.
include <iostream>
using namespace std;
int main()
{
char name[3][30];
int i, j;
for(i=0;i<=2;i++)
{
cout << "Please enter name: ";
cin >> name[i];
}
for(i=0;i<=1;i++)
{
for(j=i+1;j<=2;j++)
{
char temp;
if(name[i] > name[j])
{
temp = name[i];
name[i] = name[j];
name[j] = temp;
}
}
}
for(i=0;i<=2;i++)
{
cout << endl << name[i] << endl;
}
cin.ignore();
cin.get();
//system("pause");
}