34. program menampilkan bilangan matriks 3 x 3 menggunakan Array di dev c++

#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
main()
{
cout<<endl;
cout<<"  Nama          : EKA INDAH SARI "<<endl;
cout<<"  Mata Kuliah   : Algoritma & Pemrograman  "<<endl<<endl;

int a[3][3],b[3][3],c[3][3],i,j,k;

cout<<"  Matriks 3 x 3 :";
cout<<endl;;
for(i=0;i<3;i++){
for(j=0;j<3;j++){

cout<<"  Input Baris "<<(i+1)<<" , Kolom "<<(j+1)<<" = ";

cin>>a[i][j];}
cout<<endl;}

cout<<"  Matriks 3 x 3 = "<<endl<<endl;

for(i=0;i<3;i++){
for(j=0;j<3;j++){
cout<<setw(4)<<a[i][j];}
cout<<endl<<endl;}
getch ();
}






Komentar

Postingan populer dari blog ini