Created
May 16, 2013 07:10
-
-
Save gokhanyavas/5589934 to your computer and use it in GitHub Desktop.
Dışarıdan girilen NxN boyutlu bir matriste bazı hatalar oluşmuştur. Bu hatalar sıfır ile gösterilmiştir.
Her satırda kaç tane hata olduğunu 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<conio.h> | |
int main() | |
{ | |
int i,j,n; | |
int mat[10][10],hata[16]; | |
printf("Satir Sutun Sayisi : "); | |
scanf("%d",&n); | |
for(i=0;i<n;i++) | |
for(j=0;j<n;j++) | |
{ | |
printf("%d.satir, %d.sutun elemani : ",i,j); | |
scanf("%d",&mat[i][j]); | |
} | |
for(i=0;i<n;i++) | |
hata[i]=0; | |
for(i=0;i<n;i++) | |
for(j=0;j<n;j++) | |
if(mat[i][j]==0) hata[i]++; | |
for(i=0;i<n;i++) | |
printf("%d.sutundaki hata sayisi : %d\n",i,hata[i]); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment