JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

metrix | JustPaste.app
8 months ago84 views

metrix

#include<stdio.h>
#include<conio.h>
int main(){
	int i,j,c,r,k;
	int a[100][100],b[100][100],m[100][100];
	printf("Enter r:");
	scanf("%d",&r);
	printf("Enter c:");
	scanf("%d",&c);
	printf("ETER METRIX 1 \n");
	for(i=0;i<r;i++){
	for(j=0;j<c;j++){
		scanf("%d",&a[i][j]);
	}
	}
	printf("ENTERED METRIX 1 \n");
	
	for(i=0;i<r;i++){
	for(j=0;j<c;j++){
		printf("%d ",a[i][j]);
	}
	printf("\n");
	}
	printf("ETER METRIX 2 \n");
	for(i=0;i<r;i++){
	for(j=0;j<c;j++){
		scanf("%d",&b[i][j]);
	}
	}
	printf("ENTERED METRIX 2 \n");
	
	for(i=0;i<r;i++){
	for(j=0;j<c;j++){
		printf("%d ",b[i][j]);
	}
	printf("\n");
	}
	printf("- PRODUCT -\n");
	
	for(i=0;i<r;i++){
	for(j=0;j<c;j++){
		for(k=0;k<c;k++){
		m[i][j]=m[i][j]+a[i][k]*b[k][j];
		}
		}
	}
	
	for(i=0;i<r;i++){
	for(j=0;j<c;j++){
		printf("%d ",m[i][j]);
	}
	printf("\n");
	}
	
	getch();
}

⚠️Content was pasted as plain text and auto-formatted as a code block. Use the Code Block button in the editor for proper formatting.

← Back to timeline