Hello. I have question. For example i have a structure with items in shop. I want to find out which items i have most. This code words but finds only one item, but if i have several items with same quantity the output still one item. The question is how to make program to show all Items with same biggest quantity.
Code:for (k=1;k<i;k++) { if (item[k].quantity>=item[k-1].quantity) max=k; } printf ("most items \n"); printf (" %s %d \n ",item[max].name,item[max].quantity); system("pause"); }