C PROGRAM TO FIND THE TRANSPOSE OF A MATRIX

/*PROGRAM TO FIND THE TRANSPOSE OF A MATRIX*/   #include<stdio.h> #include<conio.h> void main() { int a[3][3],b[3][3],i,j; clrscr();   for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“Enter a%d%d= “,i,j); scanf(“%d”,&a[i][j]); } }   for(i=0;i<3;i++) { for(j=0;j<3;j++) { b[j][i]=a[i][j]; } }   printf(“\n THE TRANSPOSE OF MATRIX \n”); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\tb%d%d=%d”,i,j,b[i][j]); } printf(“\n”); } getch(); } 163 total views,…

163 total views, 2 views today

Read More

C Program To Find Product of Two Matrices

/*PROGRAM TO PRINT THE PRODUCT OF TWO 3X3 MATRICES USING ARRAYS*/   #include<stdio.h> #include<conio.h> void main() { int a[3][3],b[3][3],c[3][3],i,j,k; clrscr();   for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\nEnter a%d%d=”,i,j); scanf(“%d”,&a[i][j]); } }   for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\t Enter b%d%d=”,i,j); scanf(“%d”,&b[i][j]); } }   for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\n\ta%d%d=%d”,i,j,a[i][j]); } }   for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\n\t…

120 total views, no views today

Read More

C PROGRAM TO ADD TWO MATRICES

/*PROGRAM TO ADD MATRICES USING ARRAYS */   #include<stdio.h> #include<conio.h>   void main() { int a[3][3],b[3][3],c[3][3],i,j; clrscr(); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\tEnter a%d%d=”,i,j); scanf(“%d”,&a[i][j]); } }   for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\t Enter b%d%d=”,i,j); scanf(“%d”,&b[i][j]); } }   for(i=0;i<3;i++) { for(j=0;j<3;j++) { c[i][j]=a[i][j]+b[i][j]; printf(“\t%d”,c[i][j]); } }   getch(); } 103 total views, no views today

103 total views, no views today

Read More

C PROGRAM TO READ AND PRINT THE ELEMENTS OF A 2 DIMENSIONAL ARRAY

/*PROGRAM TO READ AND PRINT THE ELEMENTS OF A 2 DIMENSIONAL ARRAY*/     #include<stdio.h> #include<conio.h> void main() { int a[3][3],i,j; clrscr(); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\nEnter a%d%d=”,i,j); scanf(“%d”,&a[i][j]); } } for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“\n\n\t a%d%d=%d”,i,j,a[i][j]); } } getch(); } 89 total views, no views today

89 total views, no views today

Read More

C PROGRAM TO FIND MIN AND MAX IN ARRAYS

/*PROGRAM TO FIND MIN AND MAX IN ARRAYS*/     #include<stdio.h> #include<conio.h> void main() { int a[5],i,min,max; for(i=0;i<5;i++) { printf(“\nEnter a%d= “,i); scanf(“%d”,&a[i]); } min=a[0]; max=a[0]; for(i=0;i<5;i++) { printf(“\na%d=%d”,i,a[i]); if(min>a[i]) min=a[i]; if(max<a[i]) max=a[i]; } printf(“\n min=%d\nmax=%d”,min,max); getch(); } 101 total views, no views today

101 total views, no views today

Read More

C PROGRAM TO PRINT THE ODD SUM AND EVEN SUM OF  ARRAY

/*PROGRAM TO PRINT THE ODD SUM AND EVEN SUM OF  ARRAY*/     #include<stdio.h> #include<conio.h> void main() { int a[50],i,n,esum=0,osum=0; clrscr(); printf(“\n How many elements you want to enter?”); scanf(“%d”,&n); for(i=0;i<n;i++) { printf(“\n\tEnter a%d=”,i); scanf(“%d”,&a[i]); if((a[i]%2)==0) esum+=a[i]; else osum+=a[i]; } printf(“\n The even sum and odd sum are: %d & %d”, esum, osum); getch(); }…

100 total views, no views today

Read More

C PROGRAM TO READ AND PRINT THE NUMBERS AND THEIR SUM USING ARRAYS

/*PROGRAM TO READ AND PRINT THE NUMBERS AND THEIR SUM USING ARRAYS*/   #include<stdio.h> #include<conio.h> void main() { int a[20],i,n,sum=0; clrscr(); printf(“\nHow many no.s you want to sum:”); scanf(“%d”,&n); for(i=0;i<n;i++) { printf(“\n\Enter a[%d]= “,i); scanf(“%d”,&a[i]); }   for(i=0;i<n;i++) { printf(“\n  a[%d]=%d”,i,a[i]); sum+=a[i]; }   printf(“\n\sum= %d”,sum); getch(); } 101 total views, no views today

101 total views, no views today

Read More

C PROGRAM TO READ AND PRINT A 1 DIMENSIONAL ARRAY

/*PROGRAM TO READ AND PRINT A 1 DIMENSIONAL ARRAY*/   #include<stdio.h> #include<conio.h> void main() { int a[5],i; clrscr(); for(i=0;i<5;i++) { printf(“\n Enter a%d=”,i); scanf(“%d”,&a[i]); } printf(“\nArray entered is:”); for(i=0;i<5;i++) { printf(“\ta[%d]=%d”,i,a[i]); } getch(); } 93 total views, no views today

93 total views, no views today

Read More