0% found this document useful (0 votes)
62 views2 pages

Perkalian Matrik C++

This document contains information about a student named Irwanda Syahputra including their NIM (student ID number), name, study program, and a C++ program to multiply two 2x2 matrices. The program prompts the user to input values for the two matrices, calculates the product, and displays the result.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Perkalian Matrik C++

This document contains information about a student named Irwanda Syahputra including their NIM (student ID number), name, study program, and a C++ program to multiply two 2x2 matrices. The program prompts the user to input values for the two matrices, calculates the product, and displays the result.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

IRWANDA SYAHPUTRA

NIM:110170075

NAMA: IRWANDA SYAHPUTRA


UNIT :A3
NIM: 110170075

JURUSAN: TEKNIK INFORMATIKA

PROGRAM PERKALIAN MATRIK 2 ORDO


#include <cstdlib>
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{
int a[2][2],b[2][2],m,n;
for(m=0;m<2;m++)
{
for(n=0;n<2;n++)
{
cout<<"masukkan nilai matriks a("<<m<<","<<n<<"):";
cin>>a[m][n];
}
}
for(m=0;m<2;m++)
{
for(n=0;n<2;n++)
{
cout<<"masukkan nilai matriks b("<<m<<","<<n<<"):";
cin>>b[m][n];
}
}

IRWANDA SYAHPUTRA
cout<<"C:\n";
for(m=0;m<2;m++)
{
for(n=0;n<2;n++)
{
cout<<setw(3)<<(a[m][0]*b[0][n]+ a[m][1]*b[1][n]);
}
cout<<'\n';
}
system("PAUSE");
return EXIT_SUCCESS;
}

HASIL PROGRAM:

NIM:110170075

You might also like