C programming Bangla Tutorial 5.175 : Array | Matrix Addition & Subtraction

preview_player
Показать описание
All C programming videos:
Рекомендации по теме
Комментарии
Автор

Easily I understand the solving process of matrix by watching your tutorial.
Your teaching style is very good and easily anyone can understand your teaching.
Thank you.
Best of luck sir ♥️

manabbarai
Автор

Thanks. Today i complete my c/cpp lab by viewing your video only...❤️

sarkersbasicmath
Автор

Thank you for your hardwork vaia, keep going❣️

nusratjahanbably
Автор

Your videos are very easy to understand.

JessicaJacqueline-qm
Автор

Your videos are very easy to understand. Thank you very much for making such video series. May Allah help you.🥰
Thank you again.💖

md.mahdihasan
Автор

//code for ADDITION AND SUBTRACTION OF MATRIX
#include<stdio.h>
int main()
{
int i, j, NumberofColumns, NumberofRows;
int A[10][10], B[10][10], C[10][10];
printf("Enter the number of Rows and Columns:");
scanf("%d %d", &NumberofRows, &NumberofColumns);
printf("\tEnter elements for A matrix: \n\n");


//scanning A matrix
for(i=0; i<NumberofRows; i++)
{
for(j=0; j<NumberofColumns; j++)
{
printf("A[%d][%d] = ", i, j);
scanf("%d", &A[i][j]);
}
printf("\n");
}
printf("\t\n\nEnter elements for B matrix: \n\n");


//scanning B matrix
for(i=0; i<NumberofRows; i++)
{
for(j=0; j<NumberofColumns; j++)
{
printf("B[%d][%d] = ", i, j);
scanf("%d", &B[i][j]);
}
printf("\n");
}


//Printing A matrix
printf("A = ");
for(i=0; i<NumberofRows; i++) //for row
{
for(j=0; j<NumberofColumns; j++) //for colum
{
printf("\t");
printf("%d ", A[i][j]);
}
printf("\n");
}

//Printing B matrix
printf("B = ");
for(i=0; i<NumberofRows; i++) //for row
{
for(j=0; j<NumberofColumns; j++) //for colum
{
printf("\t");
printf("%d ", B[i][j]);
}
printf("\n");
}

//Addding A and B



for(i=0; i<NumberofRows; i++) //for row
{
for(j=0; j<NumberofColumns; j++) //for co
{
C[i][j]=A[i][j]+B[i][j]; //FOR SUBTRACTION USE - HERE
}

}

//Printing C matrix
printf("\nC =\t");
for(i=0; i<NumberofRows; i++) //for row
{
for(j=0; j<NumberofColumns; j++) //for colum
{
printf("%d\t", C[i][j]);
}
printf("\n");
printf("\t");
}

//FOR SUBTRACTION USE (-) INSTEAD OF (+)

}

whoami
Автор

Assalamu alikom.sir allah apnake uttom ja ja dan koruk amin

shifathasannahid
Автор

valo laglo..khub sohojei bujhe gesi vaia

TeachRSMusic
Автор

Thanks for making tutorial based on c language.Please make tutorial on c++.

mahmudulhassansayem
Автор

binary search with array pls make a video on that topics

md.shahadathossain
Автор

sir, suppose ami a matrix er jonno alada number er row, column nilam ar b matrix er jonno alada row-column nilam. ekhon matrix er sum korar somoy for loop e i ar j er man koto porjonto chalabo?

rifatibnnezam
Автор

sir animation editing somporke video banan plz

alokff
Автор

number theory er aro kisu video koren.

tvj
Автор

Sir, At first we declared the size of rows and columns which 10/10, so we have seen here is limitation user can’t give more than 10 columns & rows, so how to overcome this problem?

mdrobin
Автор

#include<stdio.h>

int main()
{ int i, j;
int A[10][10], B[10][10], C[10][10], nor, noc;

printf("Enter the number of raws & cols:");
scanf("%d %d", &nor, &noc);

//scanning A matrix
printf("Enter elements of aa matrix:\n");
for(i=0; i<noc; i++)
{
for(j=0; j<nor; j++)
{ printf("A[%d][%d]=", i, j);
scanf("%d", &A[i][j]);
}
printf("\n");
}


//scanning B matrix
printf("Enter elements of B matrix:\n");
for(i=0; i<noc; i++)
{
for(j=0; j<nor; j++)
{ printf("B[%d][%d]=", i, j);
scanf("%d", &B[i][j]);
}
printf("\n");
}

//printing A matrix
printf("A=");
for(i=0; i<noc; i++)
{
printf("\t");
for(j=0; j<nor; j++)
{
printf("%d ", A[i][j]);
}
printf("\n");
}

//printing B matrix
printf("\nB=");
for(i=0; i<noc; i++)
{
printf("\t");
for(j=0; j<nor; j++)
{
printf("%d ", B[i][j]);
}
printf("\n");
}
//adding the matrixes(A+B)
printf("\nA + B=\n");
for(i=0; i<noc; i++)
{
for(j=0; j<nor; j++)
C[i][j]=A[i][j]+B[i][j];
}

for(i=0; i<nor; i++)
{printf("\t");
for(j=0; j<noc; j++)
printf("%d ", C[i][j]);
printf("\n");
}
return 0;
}

I have done!

Aman
welcome to shbcf.ru