Jumat, 08 Juli 2011

algoritma dan program untuk menghitung determinan matriks berordo 2×2.

Algoritma:
-deklarasi
Input (integer) = x,y,z,q.
Input (integer) = determinan.
-Deskripsi
 [x.y.z.q]
Rumus determinan matriksnya yaitu = (x x q)-(y x z)
hasil determinan
#include <iostream.h>

int main()
{
int x,y,z,q,determinan;
cout<<"nilai x : ";cin>>x;
cout<<"nilai y : ";cin>>y;
cout<<"nilai z : ";cin>>z;
cout<<"nilai q : ";cin>>q;
cout<<endl;
determinan=(x*q)-(y*z);
cout<<"output atau nilai determinan matriks yaitu : "<<determinan<<endl;

return 0;
}

0 komentar:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Blogger Theme by Lasantha - Premium Blogger Templates | Affiliate Network Reviews