i have declared a 2d , 3x3 array..it will display 3 rows and 3 columns..what i want is for the 3rd row only to display 1 column...how can i do this please..
#include <iostream>
#include <string>
#include <conio.h>
using namespace std;
int main()
{
string names[3][3]= {};
for (int i = 0; i < 3; i++)
{
cout<<" ";
for (int j = 0; j < 3; j++)
{
cout<<i<<j<<" ";
}
cout<<endl;
}
getch();
system("pause");
return 0;
}
Aucun commentaire:
Enregistrer un commentaire