Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=&matriz[0][0];
- if(*(p+ord-1)==num)
- {
- return 1;
- }
- else if(*(p+ord-1)!=num);
- {
- return (checainteiro(matriz, num, ord-1));
- }
- if(*(p+ord-1)!=num && (ord-1)==0)
- {
- return 0;
- }
- printf("n----Construcao da Matriz----nn");
- for(i=0; i<linhas; i++)
- {
- for(j=0; j<colunas; j++)
- {
- printf("Elemento[%d][%d] = ", i, j);
- scanf("%d", &matriz[i][j]);
- }
- printf("n");
- }
- printf("n----Construcao da Matriz----nn");
- for(i=0; i<linhas; i++)
- {
- for(j=0; j<colunas; j++)
- {
- printf("Elemento[%d][%d] = %d ", i, j, matriz[i][j]);
- }
- printf("n");
- }
- printf("Digite um inteiro para checar sua ocorrencia na matriz: ");
- scanf("%d", &num);
- if((checainteiro(matriz,num, linhas*colunas))==1)
- {
- printf("O numero %d ocorre na matriz!n", num);
- }
- else
- {
- printf("O numero nao %d ocorre na matriz!n", num);
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement