hi...i'm a new in C language.it is my sample program but i don't know to include the fork function.
somebody plz help me!!!!
i need to send it soon
Code:
#include<stdio.h> #include<math.h> int a[50][50]; int b[50][50]; int c[50][50]; int i,j,m,n,p,q; void main() { //clrscr(); printf("\n enter order of Anxn matrix: \n"); scanf("%d%d",&n,&m); printf("\n enter order of Bnxn matrix: \n"); scanf("%d%d",&p,&q); if(n!=p) { printf("\n additional is impossible \n"); } else { printf("\n enter elements of matrix Anxn: \n"); for(i=0;i<n;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } printf("\n enter elements of matrix Bnxn: \n"); for(i=0;i<p;i++) { for(j=0;j<p;j++) { scanf(" %d",&b[i][j]); } } printf("\n order of matrix C is %dx%d ",n,p); for(i=0;i<n;i++) { for(j=0;j<p;j++) { c[i][j]=(a[i][j] + b[i][j]); } } printf("\n\n matrix C is : \n"); for(i=0;i<n;i++) { for(j=0;j<p;j++) { printf(" %d\t",c[i][j]); } printf("\n"); } } getch(); }
somebody plz help me!!!!
i need to send it soon
Comment