answersLogoWhite

0


Best Answer

This is a directive, not a question.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to print the sum of a sparse matrix?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program using iostreams to take as input two multi-dimensional arrays and print their sum as output Matrix Addition in Matrix format?

http://www.assignmentsclub.com/


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


Write a unix program to print print a pattern?

echo 'print a pattern'


Program to print the sum of a sparse matrix?

//Write a C program to print the sum of a sparse matrix.(Data Structure) #include #include int i,j,k,l,m,m1,m2,n1,n2,nz1=0,nz2=0,z1=0,z2=0,sm1[3][50],sm2[3][50], a[100][100],b[100][100],sm3[3][50]; void main() { clrscr(); printf("\n\n\n\t\t FIRST MATRIX"); printf("\n\nENTER THE VALUE FOR ROW = "); scanf("%d",&m1); printf("\n\nENTER THE VALUE FOR COLUMN= "); scanf("%d",&n1); clrscr(); printf("\n\nENTER THE VALUE FOR (%d*%d) MATRIX= ",m1,n1); for(i=0;inz1) printf("\n\n\nIT CAN CONVERT INTO SPARSE MATRIX\n"); else { printf("\n\nCAN'T CONVERT INTO SPARSE MATRIX\n"); exit(1); } //converting into sparse matrix printf("\n\nCONVERSION OF SPARSE MATRIX\n\n"); sm1[0][0]=m1; sm1[0][1]=n1; sm1[0][2]=nz1; k=1; for(i=0;inz2) printf("\n\n\nIT CAN CONVERT INTO SPARSE MATRIX\n"); else { printf("\n\nCAN'T CONVERT INTO SPARSE MATRIX\n"); exit(1); } //converting into sparse matrix printf("\n\nCONVERSION OF SPARSE MATRIX\n\n"); sm2[0][0]=m2; sm2[0][1]=n2; sm2[0][2]=nz2; l=1; for(i=0;i=m2&&n2) { sm3[0][0]=m1; sm3[0][1]=n1; sm3[0][2]=nz1+nz2; } else { sm3[0][0]=m2; sm3[0][1]=n2; sm3[0][2]=nz1+nz2; } k=1,l=1,m=1; while(nz1!=0&&nz2!=0) { if(sm1[k][0]==sm2[l][0]&&sm1[k][1]==sm2[l][1]) { sm3[k][0]=sm1[k][0]; sm3[k][1]=sm1[k][1]; sm3[k][2]=sm1[k][2]+sm2[k][2]; k++; l++; m++; nz1++; nz2++; } //printing of addition OS sparse matrix printf("\n\n\t\tADDTION OF SPARSE MATRIX IS\n\n"); for(i=0;i


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a C program to print the following series 112 122 . 1n2?

write a program to print the series 1/12+1/22+.........+1/n2 ?


How do you erase dot matrix print from paper?

how do you erase dot matrix print form paper


Write a c program using dynamic memory allocation function calloc to find sum of two matrices and also print the resultant matrix?

printf("%s",per>50?:"pass",per<50?:"fail");


Write a c program to print roman letters?

good morning


Can you Write a program in 'c' to print symbols of playing cards?

Yes.


Q2 Write a program to print even numbers between 10 and 50?

You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.


Write c program to print?

include <stdio.h> int main (void) { puts ("print"); return 0; }