Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>  
  3.  
  4. using namespace std;
  5.  
  6. int table(table[3][3]);
  7.  
  8. int main()
  9. {
  10.  
  11.     cout << table;
  12.  
  13.  
  14.     int a;
  15.     int b;
  16.     int c;
  17.     while(a !=66)
  18.     {
  19.  
  20.     cout <<"which one number SPACE number"<<endl;
  21.     cin >> a >> b;
  22.     system("clear");
  23.     c = table [a][b];
  24.     cout << c << endl;
  25.     fflush(stdin);
  26.     }
  27.  
  28.  
  29.     return 0;
  30.  
  31. }
  32.  
  33. int table (table[3][3])
  34. {
  35.  
  36. int table[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
  37.  
  38.     cout << table[2][2] << endl;
  39.  
  40.     for(int col = 0; col < 3; ++col)
  41.     {
  42.         for(int row = 0; row < 3; ++row)
  43.         {
  44.         cout << table[col][row] << " ";
  45.         }
  46.         cout<<endl;
  47.     }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement