Addition and Subtraction of two matrix - C Programming Language | Chetan TM
Loading ...

Addition and Subtraction of two matrix - C Programming Language

SHARE:

Tutor Chetan

C Programming Language

Question: Addition and Subtraction of Two Matrix




/* Addition and Subtraction of two matrix */ 
/* Program Coded By Chetan Thapa Magar */ 

#include<stdio.h> 
#include<conio.h> 
#include<math.h> 
void main() 
{
int m, n, i, j, a[10][10], b[10][10], add[10][10], sub[10][10];
printf("Enter the numbers for rows:\t");
scanf("%d", &m);
printf("\nEnter the number of columns:\t");
scanf("%d", &n);
printf("\nEnter the element of matrix A:\n");
for(i=0; i<m; i++)
for(j=0; j<n; j++)
scanf("%d", &a[i][j]);
printf("\nEnter the elements of matrix B:\n");
for(i=0; i<m; i++)
for(j=0; j<n; j++)
scanf("%d", &b[i][j]);
printf("\nThe Addition of Two Matrix is:\n");
for(i=0; i<m; i++)
{
for(j=0; j<n; j++)
{
add[i][j]=a[i][j]+b[i][j];
printf("%d\t", add[i][j]);
}
printf("\n");
}
printf("\nThe Subtraction of Two Matrix is:\n");
for(i=0; i<m; i++)
{
for(j=0; j<n; j++)
{
sub[i][j]=a[i][j]-b[i][j];
printf("%d\t", sub[i][j]);
}
printf("\n");
}
getch();
}
Output / Execution:
Enter the number of rows: 3
Enter the number of columns: 3 
Enter the elements of matrix A: 
1








Enter the elements of matrix B:
9








The Addition of Two Matrix is:
10 10 10
10 10 10 
10 10 10 

The Subtraction of Two Matrix is: 
-8 -6 -4
-2  0  2 
 4  6  8 

COMMENTS

Contact 9816585747 for Advertisement
Name

#Facebookdown,2,#InstagramDown,2,#Messengerdown,1,#WhatsAppdown,2,A-Class-Banks-in-Nepal,5,ADBL,8,ADBL-Vacancy,1,AdobePhotoshop,7,Advertisement,6,Africa,3,Agricultural-Development-Bank-Limited,1,Agricultural-Development0Bank-ADBL-Model-Question,1,AIMS-Hospital-and-Cancer-Center-Vacancy-for-Various-Health-Services,1,APF-Nepal-Final-Exam-Result,4,APF-Nepal-Medical-Exam-Result,4,APF-Nepal-Physical-Exam-Result,2,APF-Nepal-Promotion-Recommend-List,3,APF-Nepal-Salary,1,APF-Nepal-Vacancy-2078,2,APF-Nepal-Written-Exam-Result,4,APF-Nepal-Written-Exam-Schedule,8,APF-Promotion-List-From-Assistant-Head-Constable-to-Head-Constable,1,APF-Promotion-List-Recommendation,1,APFNepal,88,Asia,8,Australia,1,Australia-Oceania,3,Bagmati-Pradesh-Lok-Sewa-Aayog-Exam-Center,4,Bagmati-Pradesh-Lok-Sewa-Aayog-Exam-Result,5,Bagmati-Pradesh-Lok-Sewa-Aayog-Vacancy,5,Bakarid-Festival-Celebration-Wishes-Quotoes-and-Images,1,Balefi-Hydropower-Limited-IPO-Share,1,Ban-Rakshak-Exam-Result,1,Ban-Rakshak-Exam-Schedule,1,Ban-Rakshak-Model-Question,6,Ban-Rakshak-Old-Exam-Paper,1,Bank-of-Kathmandu-Limited,1,BanRakshak-Exam-Result,1,BanRakshak-Exam-Schedule,1,BBS-BSC-BED-BA-First-Year-Exam-Routine-2078,2,BBS-BSC-BED-Fourth-Year-Exam-Routine,1,BBS-BSC-BED-Second-YEar-Exam-Routine-2078,1,Belgium,2,Best-7-way-to-Earn-Money-Online,1,Best-Broker-In-Nepal,1,Best-Place-to-Visit-in-UAE,1,BOKL,1,Books,1,Brazil,1,British-Army-Vacancy,1,Broker-in-Nepal,1,Broker-Near-Me,1,BTS-Army-Biography,1,Buddha-Bhumi-Nepal-Hydropower-IPO-Share,1,Business-Tax-Exemptions-and-Facilities-in-Nepal,1,CAAN-Exam-Result,2,CAAN-Exam-Schedule,3,CAAN-Vacancy,3,Career,1492,CBS,14,CCVI-List-of-Committed-Workers,34,Celebrity-Biography,13,Celebrity-News,19,ComputerNotes,53,Countries-in-the-World,12,COVID19Nepal,5,CProgramming,6,Cricket,1,Cristiano-Ronaldo-Biography,1,CTEVT,10,Dairy-Development -Corporation-Exam-Result,1,Dish-Media-Network-Limited-IPO-Share,1,Domestic-Flights-in-Nepal-Resume-Operations,1,Dordi-Khola-Hydropower-Company-IPO-Share,1,DOTM-Nepal,9,DV-2022-Result,3,DV-2023-Opening-Date,3,DV-2023-Result,1,DV-2024-Opening-Date,1,DV-Lottery-America,5,DV-News,14,DV-Online-Form,4,DV-Result,5,DV-Result-2022,2,DV-Result-2023,2,Election-in-Nepal,1,Elon-Musk-Biography,1,EnglishNotes,2,EPS,156,EPS-Flight-Schedule,56,EPS-Form-Fillup-Namelist,12,EPS-TOPIK-Test-Result,1,Esports-in-Asian-Games-2022,1,Europe,4,Everest-Hospital,1,Exam,1,ExamCenter,167,ExamPaper,41,ExamResult,417,ExamSchedule,270,Facebook,1,Facebookdown,2,Far-Western-University,1,Festival-Wishes,1,Football,3,Four-Wheeler-Driving-License-Test-New-Rules,1,Free-Skilled-Training-Program,3,Gandaki-Pradesh-Lok-Sewa-Aayog-Approved-namelist,1,Gandaki-Pradesh-Lok-Sewa-Aayog-Exam-Result,5,Gandaki-Pradesh-Lok-Sewa-Aayog-Exam-Schedule,3,Gandaki-Pradesh-Lok-Sewa-Aayog-Vacancy,3,Gandaki-Pradesh-Lok-Sewa-Exam-Result,1,GBIME,1,Geography,2,Ghana,1,Global-IME-Bank-Limited,1,Gorkhapatra,6,Government-Staff-Salary,18,Government-Teacher-Salary,1,GovernmentJobs,421,Green-Venture-Limited-Hydropower-IPO-Share,1,GuestPost,2,Gurkha Bharti,1,Happy-Bijaya-Dashami-Wishes-and-Photos,1,Happy-International-Nurse-Day,1,Himalayan-Hydropower-Limited-IPO-Share,1,Hong-Kong,1,How-to-apply-Online-Driving-License-Form,1,ICC-Mens-T20-World-Cup,1,Increase-in-Price-of-Petrol-Diesel-Kerosene-and-Aviation-Fuel-by-Nepal-Oil-Corporation,1,India,1,Indian-Army-Rank-and-Salary,1,Indian-Idol-Season-12-Winner,1,Indian-Navy-Rank-and-Salary,1,Instagramdown,2,IPL,5,IPOResult,41,IQ,6,Jeevan-Bikas-Laghubitta-Bittiya-Sanstha-Exam-Syllabus,1,Jeevan-Bikas-Laghubitta-Bittiya-Sanstha-Limited-IPO-Share,5,Jeff-Bezos-Biography,1,Justin-Bieber-Biography,1,Jyoti-Bikash-Bank,1,Karnali-Pradesh-Lok-Sewa-Aayog-Approved-Namelist,2,Karnali-Pradesh-Lok-Sewa-Aayog-Vacancy,2,Kathmandu-Upatyaka-Khanepani-Limited,1,Khabane-Lame-Biography,1,Krishi-Bikash-Bank-Limited,1,KSK,1,Kylian-Mbappe-Biography,1,Lionel-Messi-Biography,1,list-of-airlines-in-nepal,1,List-of-Ballon-dor-winners,1,List-of-Chief-of-Army-Staff-in-Nepal,1,List-of-Countries-and-their-Independence-Day,1,List-of-esport-gami-included-as-medal-events-in-asian-game,1,List-of-IGP-of-APF-Nepal,1,List-of-IGP-of-Nepal-Police,1,List-of-International-Days-in-the-World,1,List-of-Miss-Universe-Winner,2,List-of-Miss-World-Winner,1,List-of-Presidents-of-the-United-State-of-America,1,List-of-Prime-Minister-of-Belgium,1,List-of-Public-Holidays-in-Nepal,1,Live-Stream,1,Lok-Sewa-Aayog-Exam-Center,12,Lok-Sewa-Aayog-Exam-Result,9,Lok-Sewa-Aayog-Nayab-Subba-Exam-Result,1,Lok-Sewa-Aayog-Section-Officer-Exam-Result,2,Lok-Sewa-Aayog-Vacancy,4,LokSewa,220,LokSewa-Aayog-Contact-Number-and-Recruitment,2,Lumbini-Buddhist-University,1,Lumbini-Pradesh-Lok-Sewa-Aayog-Exam-Result,2,Madhya-Bhotekoshi-IPO-Result,1,Madhya-Bhotekoshi-Jalvidyut-Company-Limited-IPO-Share,2,Mahila-Laghubitta-Bittiya-Sanstha-Limited-Vacancy-for-Junior-Assistant-Trainee,1,Malung-Khola-Hydropower-Company-IPO-Share,1,Manakamana-Smart-Laghubitta-Bittiya-Sanstha-IPO-Share,1,Manushi-Laghubitta-Bittiya-Sanstha-IPO-Result,2,Manushi-Laghubitta-Bittiya-Sanstha-IPO-Share,1,MCQS,3,Messengerdown,1,Meta,1,Mid-Western-University,1,Milkha-Singh-Biography,1,Mobile,1,ModelQuestion,34,Most-Desirable-Men-On-Television,1,MSExcel,7,MSOfficePackage,19,MSPowerPoint,1,MSWord,11,Myadi-Police,9,Myadi-Prahari,9,NATHM,1,National-Cooperative-Bank-Model-Question,1,National-Skill-Resting-Board,1,NBL,3,NEA,24,NEA-Approved-Namelist,8,NEA-Exam-Notice,5,NEA-Exam-Result,8,NEA-Exam-Routine,2,NEA-Exam-Syllabus,1,NEB,5,NEB-Class-11-Exam-Result,1,NEB-Class-12-Exam-Result,2,NEB-Class-12-Exam-Routine,2,NEB-Exam-Routine,5,NEB-Postpone-Class-12-Examination,1,Nepa-Open-University-Exam-Routine,1,Nepal,2,Nepal-Administrative-Staff-College-Vacancy,1,Nepal-Army-Exam-Routine,1,Nepal-Army-Sainya-Exam-Center,25,Nepal-Army-Sainya-Exam-Process,1,Nepal-Army-Sainya-Exam-Result,20,Nepal-Army-Sainya-Medical-Exam-Routine,1,Nepal-Army-Sainya-Physical-Exam-Routine,1,Nepal-Army-Salary,1,Nepal-Army-Vacancy-2078,6,Nepal-Army-Written-Exam-Center,1,Nepal-Army-Written-Exam-Result,4,Nepal-Army-Written-Exam-Routine,1,Nepal-Bank-Limited-Exam-Result,3,Nepal-Bank-Limited-Exam-Schedule,1,Nepal-Bank-Limited-Vacancy,1,Nepal-Driving-License-Test-Opens,1,Nepal-Electricity-Authority-Vacnacy,2,Nepal-Eye-Hospital,1,Nepal-Investment-Bank-Limited,1,Nepal-Life-Insurance-Company-Vacancy,1,Nepal-Oil-Corporation-Written-Exam-Center,3,Nepal-Oil-Corporation-Written-Exam-Schedule,3,Nepal-Police-ASI-Vacancy,1,Nepal-Police-Constable-Vacancy,1,Nepal-Police-Exam-Center,1,Nepal-Police-Exam-Result,19,Nepal-Police-Exam-Routine,1,Nepal-Police-Medical-Exam-Result,12,Nepal-Police-New-Vacany-2078-for-Technical-Group,1,Nepal-Police-Posting-List,7,Nepal-Police-Promotion-List,8,Nepal-Police-Promotion-Recommendent-List,54,Nepal-Police-Salary,2,Nepal-Police-Transfer-List,6,Nepal-Police-Vacnacy-2078,2,Nepal-Police-Written-Exam-Center,8,Nepal-Pragya-Prathisthan-Result,1,Nepal-Pragya=Prathisthan-Vacancy,1,Nepal-Reinsurance-Company-Limited,1,Nepal-Reinsurance-Company-Limited-Exam-Result,1,Nepal-Telecom,2,Nepal-Telecom-Exam-Center,1,NepalArmy,240,NepaliNotes,5,NepalPolice,273,NEPSE,149,NEPSE-Floor-Sheet-Updates,100,NEPSE-FloorSheet-Updates,72,New,3,New-Tax-Rate-in-Nepal-for-Fiscal-Year-2078-2079,1,News,2755,Neymar-Jr-Biography,1,NIBL,1,NID,29,Nijamati-Karmachari-Salary,1,NOC,8,North-America,3,Notes,38,NRB,16,NRB-Exam-Center,5,NRB-Vacancy,1,NTC,7,Nyadi-Hydropower-IPO-Result-Date,1,Nyadi-Hydropower-Limited-IPO-Share,1,Online-Earning,1,OnlineStore,4,Pradesh-No-1-Lok-Sewa-Aayog-Approved-Namelist,5,Pradesh-No-1-Lok-Sewa-Aayog-Exam-Schedule,2,Pradesh-No-1-Lok-Sewa-Aayog-Vacancy,1,PrivateBanking,173,PSC-Weekly-Notice,3,Public-Transport-New-Fare-in-Nepal,4,Puneeth-Rajkumar-Biography,1,Python,4,Questions,59,Quiz,1,Radio-Nepal,3,Radio-Nepal-Promotion-List,1,Radio-Nepal-Vacancy,1,Rastriya-Anusandhann-Bibhag-Exam-Center,1,Rastriya-Anusandhann-Bibhag-Exam-Result,20,Rastriya-Banijya-Bank-Limited,18,Rastriya-Samachar-Samiti,1,RBB,39,RBB--Exam-Paper,1,RBB-Exam-Result,14,Result,2,SAFF-Championship,1,Sahas-Urja-Limited-IPO-Share,2,Samling-Power-Company-IPO-Share,5,SEE-Exam-Routine,1,ShareNews,288,Singapore-Police-Vacancy,1,South-America,3,Sports,15,Sudurpashim-Pradesh-Lok-Sewa-Ban-Rakshak-Syllabus,1,Sudurpashim-Pradesh-Lok-Sewa-Exam-Schedule,1,Sudurpashim-Pradesh-Lok-Sewa-Vacancy,3,Swasthya-Sewa-Karmachari-Salary,1,Syllabus,10,Tally,9,Taylor-Swift-Biography,1,Teacher-Service-Commission,6,Teacher-Service-Commission-Annual-Vacancy-Schedule,1,Thiago-Silva-Biography,1,Time-Person-of-the-Year,1,TipsTricks,16,Top-10-Best-Casino-in-the-World,1,Top-10-Biggest-Casino-in-the-World,1,Top-10-Facts,30,Top-10-Highest-Paid-Actor,1,Top-10-Highest-Paid-Actress,1,Top-10-Highest-Paid-Athletes,1,Top-10-Highest-Paid-Celebrities-in-the-World,1,Top-10-Highest-Paid-Cost-Per-Click-Keywords,1,Top-10-Highest-Paid-Cricket-Player,1,Top-10-Highest-Paid-Football-Player,1,Top-10-Highest-Paid-NBA-Player,1,Top-10-Highest-Paid-Pornstar-Female,1,Top-10-Highest-Paid-Pornstar-Male,1,Top-10-Largest-Company-in-USA,1,Top-10-Most-Expensive-Keywords-in-Google-Ads,1,Top-10-Most-Luxurious-and-Expensive-Casino-in-the-World,1,Top-10-Most-Profitable-Casino-in-the-world,1,Top-10-Most-Searched-Animals-on-Google,1,Top-10-Most-Searched-Pets-and-Animals-on-Google,1,Top-10-Most-Searched-Pets-on-Google,1,Top-10-Most-Viewed-Website-in-the-World,1,Top-10-Oldest-Casino-in-the-world,1,Top-10-Payment-Gateways,1,Top-10-Payment-Gateways-in-World,1,Top-10-Richest-Actor-in-the-World,1,Top-10-Richest-Actress-in-the-World,1,Top-10-Richest-Cricket-Player-in-the-World,1,Top-10-Richest-Female-Adult-Star,1,Top-10-Richest-Female-Porn-Star,1,Top-10-Richest-Football-Player-in-the-World,1,Top-10-Richest-Person-in-the-World,1,Top-10-Richest-Women-in-the-World,1,Top-10-Smallest-Dog-Breads-in-World,1,Top-10=Most-Searched-Words-on-Google,1,Transportation,1,TSC,18,TU,38,TU-Exam-Result,2,TU-Exam-Routine,4,Two-Wheeler-Driving-License-Test-New-Rules,1,UAE-United-Arab-Emirates,2,UEFA-Euro-Cup,2,UFC,4,United-State-of-America,3,University,1,UpcomingIPO,60,Upper-Solu-Hydro-Electricity-Company-IPO-Share,1,V-Lottery-America,2,WebDesign,1,WhatsAppdown,2,World-Geography,9,World-Happiness-Index,1,Worst-Broker-in-Nepal,1,
ltr
item
Chetan TM: Addition and Subtraction of two matrix - C Programming Language
Addition and Subtraction of two matrix - C Programming Language
Tutor Chetan C Programming Language Question: Addition and Subtraction of Two Matrix
https://1.bp.blogspot.com/-RGmEMG-49eA/XtCQx7D6wJI/AAAAAAAABOU/6CDCGlQx6zc-9F6FLCshm76vStbNq6pmACLcBGAsYHQ/s16000/Part%2B1.jpg
https://1.bp.blogspot.com/-RGmEMG-49eA/XtCQx7D6wJI/AAAAAAAABOU/6CDCGlQx6zc-9F6FLCshm76vStbNq6pmACLcBGAsYHQ/s72-c/Part%2B1.jpg
Chetan TM
http://www.chetantm.com.np/2021/03/addition-and-subtraction-of-two-matrix.html
http://www.chetantm.com.np/
http://www.chetantm.com.np/
http://www.chetantm.com.np/2021/03/addition-and-subtraction-of-two-matrix.html
true
5092578752892144998
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content