package program1;
import java.util.*;
class Program1 {
static Scanner input=new Scanner(System.in);
public static void main(String[]args){
int m[][]=new int[2][2];
int n[][]=new int[2][2];
int s[][]=new int[2][2];
System.out.println("Masukkan Matriks M:");
for(int i=0;i<2;i++){
for(int j=0;j<2;j++){
System.out.println("["+(i+1)+"]["+(j+1)+"]:");
m[i][j]=input.nextInt();}}
System.out.println("Matriks M:");
for(int p=0;p<2;p++){
for(int q=0;q<2;q++){
System.out.print(+m[p][q]+"");}
System.out.println("");}
int a[][]=new int[2][2];
int b[][]=new int[2][2];
int c[][]=new int[2][2];
System.out.println("Masukkan Matriks N:");
for(int i=0;i<2;i++){
for(int j=0;j<2;j++){
System.out.println("["+(i+1)+"]["+(j+1)+"]:");
n[i][j]=input.nextInt();}}
System.out.println("Matriks N:");
for(int x=0;x<2;x++){
for(int y=0;y<2;y++){
System.out.print(+n[x][y]+"");}
System.out.println("");
}
}
}
Next
« Prev Post
« Prev Post
Previous
Next Post »
Next Post »
Subscribe to:
Post Comments (Atom)
ConversionConversion EmoticonEmoticon