Question

Write a C++ program to demonstrate exception handling by using matrix multiplication operation. Matrix multiplication function should notify if the order of the matrix is invalid, using exception.

25 Nov 2017
Answer :
Word Count : 192

#include<iostream.h>

#include<conio.h>

#include<process.h>

#include<exception.h>

void matsum()

{

int m, n, i, j, first[10][10], second[10][10], sum[10][10];

try

{

cout << "Enter the number of rows and columns of matrix ";

cin >> m >> n;

cout << "Enter the elements of first matrix\n";

if (m>10 || n>10)

//exit(0);

throw 1;

}

catch(int)

{

cout<<"subscript invalid";

}

for ( i = 0 ; i < m ; i++ )

for (

_____ __________ _____ ___ ____.
__________ _______ ________ __________ ____ ______ ___ ___ _____ _____ ________ ____.
_________ ______ ______ _____ ____ ________ _____.
___ _________ ____ _____ _____ ___ ______ ________ ______.
____ __________ _____ _________ _________.
_________ ___ _____ __________ _________ _________ ________ __________ __________ _________ ___.
_______ __________ _____ _________ _____ __________ ________ _________ ________ __________.
___ __________ _____ _________ __________ ____ _________ ______.
___ _______ ________ ______ ________ ______ __________ ____ __________ ___ ______.
_____ ___ ____ _____ ______ ___ ___.
___ _________ ___ _________ _______.
_________ ____ ____ _______ ________ ____ ________ _______ ____ ________ _______.
___ ________ ________ _______ ___ _____ _____ ____.
___ _______ _______ _______ __________ ___ ____ _______ ______ __________ _______ _______.
__________ _________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU BCSL 32 2016 - Write a C++ program to demonstrate exception handling by using matrix | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→