Skip to content

Commit

Permalink
naval recursivo
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeltakano committed Apr 1, 2018
1 parent e75b922 commit cacbdc0
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions naval.c
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
#include <stdio.h>
#include <stdlib.h>

int verifica(int *matriz, int numero, int aux){

}

int main(){
void main(){
char **matriz;
int m,n; //ex: 5 e 3 ou 5 e 5//
int i,j;
scanf("%d %d",&m,&n);
//alocando uma matriz de ponteiro//
matriz = (char*)malloc(m*sizeof(char));
for(i = 0; i < m; i++){
matriz[i] = (char*)malloc(n*sizeof(char));
}
//percorrendo a matriz com os valores . ou #
int m,n;
int jogadas;
int i;
//capturando o numero de linhas e colunas para matriz//
scanf("%d",&m);
scanf("%d",&n);
//alocando memoria para matriz de char//
matriz = malloc(m * sizeof(char));
for(i=0; i<m; i++){
for(j=0; j<n; j++){
scanf("%c",&matriz[i][j]);
}
matriz[i] = malloc(n * sizeof(char));
}
}

0 comments on commit cacbdc0

Please sign in to comment.