يه مشكل با اين كد دارم(c)
ببخشيد كه يكم طولانيه آخه خواستم خوشگلش كنم اما هرچي ميزنم كامپايل شه تو خط سوم همش خطا ميده.:41:
هرچي هم عوض كردم نشد.ممنون ميشم كمكم كنيد.:10:
کد:
#include<stdio.h>
#include<conio.h>
void minput(void)
void multiply(void)
void output(void)
void main{
char ans;
printf("Hi,This is a program that has been written by Abtin");
printf("/nThis program willmultiply two matrix.");
printf("/nDo you want to continew?(y\n)");
if(ans=='y')
{
minput();
}//end of if
else
printf("/nThanks.My program finished here.")
clrscr();
getch();
}//end of main
//**********************
void minput(void){
int mat1[2][3],mat2[3][4],i,j;
printf("please enter the value of the first matrix:");
for(i=0;i<2;i++)
for(j=0;j<3;j++)
scanf("%d%d",&mat1[i][j]);
printf("your matrix isthis:");
for(i=0;i<2;i++)
for(j=0;j<3;j++)
printf("%d",mat1[i][j]);
printf("/n");
//end of inputin matrix 1
printf("Now please enter your second matrix:");
for(i=0;i<3;i++)
for(j=0;j<4;j++)
scanf("%d%d",&mat2[i][j]);
printf("/nyour second matrix is this:");
for(i=0;i<3;i++)
for(j=0;j<4;j++)
printf("%d",mat2[i][j]);
printf("/n");
//end of inputing matrix 2
printf("Do you want to continew?(y\n)");
char ans;
if(ans=='y'){
multiply(void mat1,void mat2);
}//end of if
else
printf("Thanks for your giving time for my program");
getch();
}//end of minput
//********************
void multiply(void mat1,void mat2){
printf("now we want to multiply your two matrixes");
int mat3[3][4],k,i,j;
for(i=0;i<2;i++)
for(j=0;j<4;j++){
mat3[i][j]=0;
for(k=0;k<3;k++)
mat3[i][j]=mat3[i][j]+mat[i][k]*mat2[k][j];
output(void mat3);
}//end of for
}//end of multiply
//**********************
void output(void mat3){
printf("This is your result of choosing matrixes:%d",mat3);
}//end of output