0

hi everyone

the program below is a function that should give the number of items greater than a number entered by a user.(unsorted list ADT)

ex:

input 3

unsorted list contains: 2 6 8 1 5 9 8

output should be 5

here is my try by there are alot of errors..could u plz help?

```
int GreaterThanItem(ItemType givenItem)
{
Node *ptr;
Ptr=head;
While(ptr!=node*)NULL)
{
If(ptr->info==item)
{
int Count_Max(node_ptr&q,int x)
{
node_ptr p;
p=q;
int count=0;
while(p!=NULL)
{
if(p->num > x)
count++;
p=p->next;
}
return count;
}
}
Ptr=ptr->next;
}
Return NULL;
}
```