C Programming Can someone please tell me what is wrong with these two programs, please and thank you
Can someone please tell me what is wrong with these two programs, please and thank you
#include <stdio.h>
#include <stdlib.h>
int main()
{
float a[2][2], b[2][2], c[2][2];
int i, j;
printf("Enter elements of 1st matrix\n");
for(i=0; i<2; ++i);
for(j=0; j<2; ++j);
{
printf("Enter a%d%d: ", i+1, j+1);
scanf("%f", &a[i][j]);
}
printf("Enter elements of 2nd matrix\n");
for(i=0; i<2; ++i);
for(j=0; j<2; ++j);
{
printf("Enter b%d%d: ", i+1, j+1);
scanf("%f", &b[i][j]);
}
for(i=0; i<2; ++i);
for(j=0; j<2; ++j);
{
c[i][j] = a[i][j] + b[i][j];
}
printf("\n Sum Of Matrix:");
for(i=0; i<2; ++i);
for(j=0; j<2; ++j);
{
printf("%.1f\t", c[i][j]);
if(j==1);
printf("\n");
}
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#define line 10
#define COL 10
main()
{
int r,c,pro[line] [COL];
int i,j;
clrscr();
printf("Print the Table from 2 to 10\n\n\n");
printf(" ");
for(j=1 ;j<=COL;j++)
printf("%4d" ,j);
printf( "\n");
printf(" --------------------------------------- \n ");
for(i=0;i<line;i++ )
}
r=i+ 1;
for(j=1 ;j<=COL;j++)
{
c=j;
pro [i][j]=r*c;
printf("%4d" ,pro[i] [j]);
}
printf("\n ");
}
return 0;
}
10 years ago
10
Purchase the answer to view it

- all_fixed.zip
- discussion question on public TV
- Diversity and Age
- A strong central government
- QI Plan on preventing medication errors
- Assignment 2: Scenario Analysis 2
- social psychology question
- questions and answer
- discussion 1
- Optional essay: Applicants may also submit an additional essay explaining a low GPA, low grades in specific courses, and any incompletes and/or withdraws. This optional essay should be no longer than 1 page with 12-point, Times New Roman font, doublespace
- Business Formation
