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
How many bytes is a struct in c?
How do you declare a variable that will hold string values?
What is static memory allocation?
What is a char c?
How many main () function we can have in a project?
What is logical error?
Can 'this' pointer by used in the constructor?
How do you initialize pointer variables?
write an algorithm to display a square matrix.
Explain what are global variables and explain how do you declare them?
What is action and transformation in spark?
FILE PROGRAMMING
What are structures and unions? State differencves between them.
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Which control loop is recommended if you have to execute set of statements for fixed number of times?