-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathspase
More file actions
59 lines (54 loc) · 870 Bytes
/
spase
File metadata and controls
59 lines (54 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include<stdio.h>
#include<stdlib.h>
struct node
{
int row;
int column;
int data;
struct node*link;
};
struct node*head=NULL;
int count=0;
void add_node()
{
{
for(j=0;j<c;j++)
{
scanf("%d",&mat[i][j]);
if(mat[i][j]!=0)
{ count++;
}
}
}
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
//this is importantat change we sholud look into it
}
}
}
}
void display()
{
int i;
struct node*current=head;
if(head==NULL)
{
printf("Linked List is empty .\n");
}
else
{
for(i=0;i<count+1;i++)
{
printf("%d\t%d\t%d\n",current->row,current->column,current->data);
current=current->link;
}
}
}
int main()
{
add_node();
display();
return 0;
}