Advertisement
Michele13

Esercizio C++

Feb 15th, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5.  
  6. bool inversa(string l[m][n]){
  7.    
  8.     for (int q=0; p<n; p++) {
  9.         for (int p=0; p<i; p++)
  10.         {
  11.             string tmp=l[m][n]
  12.             int lung=tmp.length;
  13.             //for (int
  14.         }
  15.     }
  16.     return true;}
  17.    
  18. int main() {
  19.     // input matrice stringhe
  20.     int i,j;
  21.     cout << "num righe: ";
  22.     cin >> i;
  23.     cout << endl << "num colonne: ";
  24.     cin >> j;
  25.    
  26.     string matrix[i][j];
  27.     for (int a=0; a<i; a++) {
  28.         for (int b=0; b<j; b++) {
  29.             cout << "Input[" << a+1 << "][" << b+1 << "]: ";
  30.             cin >> matrix[a][b];
  31.             }
  32.         }
  33.        
  34.  
  35.     // output matrice stringhe
  36.    
  37.     cout << endl;
  38.    
  39.     for (int a=0; a<i; a++) {
  40.         for (int b=0; b<j; b++) {
  41.             cout << matrix[a][b] << " ";
  42.             }
  43.         cout << endl;
  44.         }
  45.     cout << endl;
  46.     bool ciao=inversa(matrix[i][j]);
  47.     cout << ciao;
  48. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement