#include <iostream>
#include <iomanip>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char *argv[]) {
int i,j;
int data[3][3];
cout<<"-------------------------\n\n";
cout<<" MATRIK 3X3 "<<endl;
for (i=0;i<3;i++)
{ for(j=0;j<3;j++)
{cout<<"masukkan data "<<setw(2)<<i<<";"<<j<<" = "<<setw(3);
cin>>data[i][j];}}
for (i=0;i<3;i++)
{for(j=0;j<3;j++)
{ cout<<setw(3)<<data[i][j];}
cout<<endl;}
return 0;
}
Hasil Compile :
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar