Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define M 4;
- MAIN
- indice_row_carattere(A, 0, 0, S);
- ENDMAIN
- void indice_row_carattere(int **A, int row, int colum, char lettera){
- if(row==M){
- cout<<"FINE";
- }
- else if(colum<M){
- if(A[row][colum]==lettera){
- cout<<"Indice di riga: "<<row;
- cout<<"Indice di colonna: "<<colum<<endl;
- }
- indice_row_carattere(A, row, colum+1, lettera);
- }
- indice_row_carattere(A, row+1, 0, lettera);
- }
- }
Add Comment
Please, Sign In to add comment