Learn C ProgrammingLearn ProgrammingPrograms On ArraysResources

079. Write a program to accept two M X N matrices and print their multiplication in C language

#include<stdio.h> #include<conio.h> main() { int i,j,m,n,k,a[5][5],b[5][5],c[5][5]; clrscr(); printf("Enter order of matrix :\n"); scanf("%d%d",&m,&n); printf("Enter matrix elements of first matrix.....\n"); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]);   printf("Enter matrix elements of second matrix.....\n"); for(i=0;i<m;i++)…
Prashant Chaudhari
September 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On ArraysResources

074. Write a program to accept two M x N matrices and add them in C language

#include<stdio.h> #include<conio.h> main() { int i,j,m,n,a[5][5],b[5][5],c[5][5]; clrscr(); printf("Enter order of matrix :\n"); scanf("%d%d",&m,&n); printf("Enter matrix elements of first matrix.....\n"); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]);   printf("Enter matrix elements of second matrix.....\n"); for(i=0;i<m;i++)…
Prashant Chaudhari
September 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On ArraysResources

072. Write a program to accept a number n from user and then accept n array elements from user, print these array elements in ascending and descending order in C language

#include<stdio.h> main() {     int n,i,a[20],j,temp;     printf("Enter number : ");     scanf("%d",&n);    printf("Enter array elements...\n");       for(i=0;i<n;i++)     {         printf("Enter element %d : ",i+1);         scanf("%d",&a[i]);     }       for(i=0;i<n;i++)…
Prashant Chaudhari
September 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On ArraysResources

070. Write a program to accept a number n from user and then accept n array elements from user and print maximum and minimum array element from that set of array in C language

#include<stdio.h> #include<conio.h> main() { int n,i,a[20]; clrscr(); printf("Enter number : "); scanf("%d",&n); printf("Enter array elements...\n"); for(i=0;i<n;i++) { printf("Enter element %d : ",i+1); scanf("%d",&a[i]); }  …
Prashant Chaudhari
September 18, 2012
DEMO01