Matrix Addition - C program
4:34:00 AM
C Programs, Matrix Addition C program
C program source code to Add two Matrices.
/*Add Two Matrices*/
/*mechatrofice*/
#include <stdio.h>
#include <conio.h> void main() { int a[10][10],b[10][10],c[10][10],i,j,m1,m2,n1,n2; clrscr(); printf("Matrix1\nEnter the no of rows="); scanf("%d",&m1); printf("Enter the no of columns="); scanf("%d",&n1); printf("Enter the matrix element\n"); for(i=0;i<m1;i++){ for(j=0;j<n1;j++){ scanf("%d",&a[i][j]); }} printf("Matrix2\nEnter the no of rows="); scanf("%d",&m2); if(m1==m2){ printf("Enter the no of columns="); scanf("%d",&n2); if(n1==n2){ printf("Enter the matrix element\n"); for(i=0;i<m2;i++){ for(j=0;j<n2;j++){ scanf("%d",&b[i][j]); }} printf("Matrix1\n"); for(i=0;i<m1;i++){ for(j=0;j<n1;j++){ printf("\t%d\t",a[i][j]); } printf("\n"); } printf("\t\t\t+\nMatrix2\n"); for(i=0;i<m2;i++){ for(j=0;j<n2;j++){ printf("\t%d\t",b[i][j]); } printf("\n"); } for(i=0;i<m1;i++){ for(j=0;j<n1;j++){ c[i][j]=a[i][j]+b[i][j]; }} printf("\t\t\t=\nMatrix sum\n"); for(i=0;i<m1;i++){ for(j=0;j<n1;j++){ printf("\t%d\t",c[i][j]); } printf("\n"); }} else{ printf("Dimension Error"); }} else{ printf("Dimension Error"); } getch(); } |
---|
Output
Print a Matrix - C Program
6:58:00 AM
C Programs, Print a Matrix - C Program
C program source code to Print a Matrix.
/*Print Matrix*/
/*mechatrofice*/
#include <stdio.h>
#include <conio.h> void main() { int a[10][10],i,j,m,n; clrscr(); printf("Matrix\nEnter the no of rows="); scanf("%d",&m); printf("Enter the no of columns="); scanf("%d",&n); printf("Enter the matrix element\n"); for(i=0;i<m;i++){ for(j=0;j<n;j++){ scanf("%d",&a[i][j]); }} printf("Entered Matrix\n"); for(i=0;i<m;i++){ for(j=0;j<n;j++){ printf("\t%d\t",a[i][j]); } printf("\n"); } getch(); } |
---|
Output
How to automatically play srt/subtitle file
10:27:00 PM
How to play srt/subtitle file automatically
Subtitles may be not play automatically each time after it is imported and saved in media/video players. Save both video file and subtitle in the same folder. If the subtitle is downloaded or copied from a different file association, the name of the subtitle and the media file might be different. So we should import subtitle each time before playing. To avoid this and make subtitles play automatically set the name same for both video and subtitle file.
eg:- video file name
mechatrofice.mp4
Save subtitle file name as
mechatrofice.srt
Subscribe to:
Posts (Atom)