i wann multiply two matrix but the part of given code is not working...i wanna input the value from the user using pointers..
#include<stdio.h>
#include<conio.h>
void main()
{
printf("This is matrix multiplication program");
printf("\nEnter the dimensions of two array ");
int Row1 = 0, Col1 = 0, Row2 = 0, Col2 = 0;
scanf("%d,%d,%d,%d", &Row1, &Col1, &Row2, &Col2);
printf("\nDmensions of two arrays are Matrix1:Row1:%d ,Col1:%d \nMatrix2:Row2: %d, Col2:%d" ,Row1, Col1, Row2, Col2);
if(Col1==Row2)
{
printf("\nCompatible to multiply");
int Matrix1[Row1][Col1];
int Matrix2[Row2][Col2];
printf("\nEnter the value of Matrix 1");
void value(Matrix1,Row1, Col1);
void value(Matrix2,Row2, Col2);
}
else
printf("\n not a compatible type to multiply");
getch();
}
void value(int *Matrix,int a, int b)
{
{
int i=0, j=0;
for(i=0; i<a; i++)
{
for( j=0; j<b; j++)
{
scanf("%d",(Matrix+i*b+j));
}
}
}
printf("value of Matrix1 are");
{
int i=0, j=0;
for(i=0; i<a; i++)
{
for(j=0; j<b; j++)
{
printf("%d",*(Matrix+i*b+j));
}
}
}
}