Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Convert this C++ program to C Program #include int main() { int m=6,n=8; int A[6][8] = { {1, 2, 3, 4, 5, 6, 7, 8}
Convert this C++ program to C Program
#include
int main()
{
int m=6,n=8;
int A[6][8] = {
{1, 2, 3, 4, 5, 6, 7, 8} ,
{2, 3, 4, 5, 6, 7, 8, 9} ,
{3, 4, 5, 6, 7, 8, 9, 10} ,
{4, 5, 6, 7, 8, 9, 10, 11} ,
{5, 6, 7, 8, 9, 10, 11, 12} ,
{6, 7, 8, 9, 10, 11, 12, 13}
};
int X[8]={1,-8,3,-6,5,-4,7,-2};
int Y[8];
for(int k=0;k
Y[k]=0;
printf("Array elements of A= ");
for(int i=0;i
printf("\t");
for(int j=0;j
printf("%d ",A[i][j]);
}
printf(" ");
}
printf("Array elements of x= ");
for(int k=0;k
printf("\t%d ",X[k]);
printf("Array elements of Y= ");
for(int i=0; i
for(int j=0; j
Y[j]+=A[i][j]*X[j];
}
for(int k=0;k
printf("\tY[%d]=%d ",k+1,Y[k]);
return 1;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started