3*3’lük Bir Matrisin Değerlerini Ekrana Yazdıran C Programı

Hits: 5

image_pdfpdf indir
#include <stdio.h>
#include <conio.h>
 
void main(void)
{
 int matris[3][3];
 int satir = 0,sutun = 0;
 
 clrscr();
 
 printf("\n Matris Programi...");
 printf("\n ==================\n");
 
 for( satir=0 ; satir<3; satir++)
 {
  for( sutun=0; sutun<3; sutun++ )
  {
   printf("Deger [%i][%i] : ",satir+1,sutun+1);
   scanf("%i",&matris[satir][sutun]);
   fflush(stdin);
  }
 }
 
 printf("\n Matrisiniz : \n");
 
 for( satir=0 ; satir<3; satir++)
 {
  printf("\n");
 
  for( sutun=0; sutun<3; sutun++ )
  {
   printf("\t%i",matris[satir][sutun]);
  }
 }
 
 getch();
}