Created
May 16, 2013 05:49
-
-
Save gokhanyavas/5589644 to your computer and use it in GitHub Desktop.
N x M boyutlu matristeki en büyük elemanı ve bu elemanın satır ve sütün adresini bulan C programı.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<conio.h> | |
int main() | |
{ | |
int i,j,n,m; | |
int sat,sut,enb; | |
int mat[10][10]; | |
printf("Satir sayisi : "); | |
scanf("%d",&n); | |
printf("Sutun sayisi : "); | |
scanf("%d",&m); | |
for(i=1;i<=n;i++) | |
for(j=1;j<=m;j++) | |
{ | |
printf("%d . satir , %d sutun elemani : ", i,j); | |
scanf("%d",&mat[i][j]); | |
} | |
enb = mat[1][1]; | |
sat = 1; | |
sut = 1; | |
for(i=1;i<=n;i++) | |
for(j=1;j<=m;j++) | |
{ | |
if(enb < mat[i][j]) | |
{ | |
enb = mat[i][j]; | |
sat=i; | |
sut=j; | |
} | |
} | |
printf("En buyuk sayi : %d\n", enb); | |
printf("Satir : %d\n ",sat); | |
printf("Sutun : %d\n ",sut); | |
getch(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#include <stdio.h>
#include <string.h>
int main ()
{
int matris[3][4],i,j ,enb=0,a,b;
}