10.09.2013 Views

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LECTURE NOTES OF ADVANCED DATA STRUCTURE (MT-CSE 110)<br />

printf("\nenter the nums of row and column B\n");<br />

scanf("%d%d",&p,&q);<br />

create_m(b,p,q);<br />

printf("\nMATRIX A IS\n");<br />

display_m(a,m,n);<br />

printf("\nMATRIX B IS\n");<br />

display_m(b,p,q);<br />

if(m==p && n==q)<br />

{<br />

add_m(a,b,m,n);<br />

printf("\nMATRIX AFTER ADDITION IS\n");<br />

display_m(c,m,n);<br />

}<br />

else<br />

printf("ADDITION IS NOT POSSIBLE");<br />

break;<br />

}<br />

}<br />

FOR SUBTRACTION:‐<br />

#include<br />

#include<br />

void create_m(int [10][10],int,int);<br />

void display_m(int [10][10],int,int);<br />

voidsub_m(int[10][10],int 10][10],int,int);<br />

int i,j,k,a[10][10],b[10][10],c[10][10];<br />

void main()<br />

{<br />

int m,n,p,q,ch;<br />

clrscr();<br />

while(1)<br />

{<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) Page ‐ 134 ‐

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!