Machine Design Prog
Machine Design Prog
1
Object Multiplication of two Matrix
#include <stdio.h>
int main()
{
int m, n, p, q, c, d, k, sum = 0;
int first[10][10], second[10][10], multiply[10][10];
if (n != p)
printf("Matrices with entered orders can't be multiplied with each other.\n");
else
{
printf("Enter the elements of second matrix\n");
multiply[c][d] = sum;
sum = 0;
}
}
printf("\n");
}
}
return 0;
}
EXPERIMENT NO.2
Object Addition of two Matrices
#include <stdio.h>
int main()
{
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
return 0;
}
EXPERIMENT NO. 3
Object Addition for the integer
#include<stdio.h>
int main()
{
int a, b, c;
c = a + b;
return 0;
}
EXPERIMENT NO. 4
#include<stdio.h>
#include<conio.h>
void main()
{
int one, two, sub;
printf("Enter first number - ");
scanf("%d",&one);
printf("Enter second number - ");
scanf("%d",&two);
sub = one - two;
printf("The subtraction of numbers %d and %d is %d",one,two,sub);
getch();
}