Data
Data
Data
W R I T E A P R O G R A M I N C T O T A K E T H E
M A T R I X ’ S S I Z E A S I N P U T F R O M T H E
K E Y B O A R D A N D D O T H E F O L L O W I N G .
T A S K 1 : A D D I T I O N O F 2 M A T R I X E S .
T A S K 2 . S U B T R A C T I O N O F 2 M A T R I X E S .
T A S K 3 . M U L T I P L I C A T I O N O F 2 M A T R I X E S .
step-6 : End
#include<stdio.h> switch(choice)
{
COde int r,c,i,j,num1[10][10],num2[10][10],res[10][10]; case 1:for(i=0;i<r;i++)
int main() for(j=0;j<c;j++){
{ res[i][j] = num1[i][j]+num2[i][j];
printf("\t %d\n", res[i][j]);}
int choice; break;
do case 2:
{ res[i][j]=num1[i][j]-num2[i][j];
printf("1. Addition\n"); printf("\t %d\n", res[i][j]);
printf("2. Subtraction\n"); break;
printf("3. Multiplication\n"); case 3:
printf("4.Exit\n\n"); res[i][j] = num1[i][j]*num2[i][j];
printf("Enter Your Choice(1-4): "); printf("\t %d\n", res[i][j]);
scanf("%d", &choice); break;
for(j=0;j<c;j++) return 0;
scanf("%d",&num2[i][j]); }
OUTPUT:
Thank
you!!