C++ Programming Blog

 
 
 

Image

#include <iostream.h>
#include <iomanip.h>
#include <conio.h>
#include \"matrix.cpp\" // included in zip

void main()
{
   int choice;
   matrix obj;
   while(1){
   clrscr();
   cout<<\"\\t\\tMATRIX OPERATIONS\\n\\n\";
   cout<<\"\\t\\t1) Addition\\n\";
   cout<<\"\\t\\t2) Subtraction\\n\";
   cout<<\"\\t\\t3) Multiplication\\n\";
   cout<<\"\\t\\t4) Exit\\n\";
   cout<<\"\\t\\tEnter your Choice :  \";
   cin>>choice;
   switch(choice){
     case 1 :  obj.matAdd();
           break;
     case 2 :  obj.matSub();
           break;
     case 3 :  obj.matMul();
           break;
     case 4 :  goto out;
     default:  cout<<\"\\n\\n\\t\\tInvalid Choice\\n\\n\";
           getch();
           break;
   }
 }
 out:
}

 
 
Didn't find what you were looking for? Find more on Program to add, subtract and multiply matrix