#include<stdio.h>
#include<conio.h>
void main()
{
  int a[3][3],b[3][2],c[3][2],i,j,k,s;
  clrscr();
  printf("enter the elements of the matrix A:\n");
  for(i=0;i<3;i++)
  for(j=0;j<3;j++)
  scanf("%d",&a[i][j]);
  printf("enter the elements of the matrix B:\n");
  for(i=0;i<3;i++)
  for(j=0;j<2;j++)
  scanf("%d",&b[i][j]);
  for(i=0;i<3;i++)
   for(j=0;j<2;j++)
 {
   s=0;
   for(k=0;k<2;k++)
   s+=a[i][k]*b[k][j];
   c[i][j]=s;
 }
 printf(" the elements of the matrix B:\n");
   for(i=0;i<3;i++)
 {
  for(j=0;j<3;j++)
  printf("%2d",a[i][j]);
  printf("\n");
 }
 printf(" the elements of the matrix B:\n");
   for(i=0;i<3;i++)
 {
  for(j=0;j<2;j++)
  printf("%2d",b[i][j]);
  printf("\n");
 }
 printf(" the elements of the matrix C:\n");
   for(i=0;i<3;i++)
 {
  for(j=0;j<2;j++)
  printf("%2d",c[i][j]);
  printf("\n");
 }
 getch();
}