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
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
The __________ attribute is used to announce variables based on definitions of columns in a table?
What is exit() function?
What does typeof return in c?
What is the difference between pure virtual function and virtual function?
Explain what are the advantages and disadvantages of a heap?
what are the facialities provided by you after the selection of the student.
Is multithreading possible in c?
What is the difference between array_name and &array_name?
What is sizeof int in c?
Where register variables are stored in c?
What is #include stdio h?
What is the argument of a function in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures