#include <iostream>
/* 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 a,b,c,d,det;
cout<<"Menghitung Determinan Matriks 2x2"<<endl<<endl;
cout<<"Masukkan nilai kolom 1 baris 1 =\t"; cin>>a;
cout<<"Masukkan nilai kolom 2 baris 1 =\t"; cin>>b;
cout<<"Masukkan nilai kolom 1 baris 2 =\t"; cin>>c;
cout<<"Masukkan nilai kolom 2 baris 2 =\t"; cin>>d;
cout<<endl;
det=a*d-b*c;
cout<<"Jadi determinan matriks tersebut adalah =\t"<<det<<endl;
return 0;
}
Comments
Post a Comment