Facebook
From sidratul, 1 Month ago, written in C++.
This paste is a reply to array 2d from sidratul - view diff
Embed
Download Paste or View Raw
Hits: 172
  1. #include<iostream>
  2. #include<string.h>
  3. using namespace std;
  4. int main(){
  5.  
  6. string a[3][3];
  7.  
  8.  for(int i=0; i<3; i++)
  9.  {
  10.      for(int j=0;j<3;j++)
  11.      {
  12.          cout<<"Enter the Elements: ";
  13.          cin>>a[i][j];
  14.      }
  15.      cout<<endl;
  16.  
  17.  }
  18. for(int i=0; i<3; i++)
  19.  {
  20.      for(int j=0;j<3;j++)
  21.      {
  22.          cout<<"Element: a["<<i<<"]["<<j<<"]: "<<a[i][j]<<endl;
  23.      }
  24.      cout<<endl;
  25.  }
  26. return 0;
  27. }
  28.