Answer Posted / it career point
//program to 3-tuple representation
#include<stdio.>
#include<conio.h>
void main()
{
int a[5][5],row,columns,i,j;
printf(Ënter the order of the matrix.(5*5)");
scanf("%d%d",&row,&columns);
printf("Enter the element of the matrix\n");
for(i=0;i<row;i++)
for(j=0;j<columns;j++)
{
scanf("%d", &a[i][j]);
}
printf("3-tuple representation");
for(i=0;i<row;i++)
for(j=0;j<column;j++)
{
if(a[i][j]!=0)
{
printf("%d %d %d", (i+1),(j+1),a[i][j]);
}
}
getch();
}
| Is This Answer Correct ? | 41 Yes | 42 No |
Post New Answer View All Answers
Explain the difference between #include "..." And #include <...> In c?
how to execute a program using if else condition and the output should enter number and the number is odd only...
How to Throw some light on the splay trees?
How to write c functions that modify head pointer of a linked list?
Explain what is a stream?
Why do we use header files in c?
What does sizeof int return?
What are the types of data types and explain?
Explain what are binary trees?
What are the ways to a null pointer can use in c programming language?
I have seen function declarations that look like this
Write a C program to count the number of email on text
What are the uses of null pointers?
Do you know the purpose of 'register' keyword?
What are c identifiers?