I tried to make myself clearer on the question but I don't know how to ask my problem. So I want to create a code in which I input N number of tickets and the N number of winners. Example:
input:
5 3 (Here is 5 and a 3, each one a different input)
382
55
44
451
128
1
4
3
Output:
382
451
44
So what I have of code is this:
#include <stdio.h>
int main()
{
int winners;
int n;
int m;
char ticketWinners[1000][100], ticket[1000];
int i;
int j;
int max[100];
scanf("%d", &n); //Input for Number of tickets
scanf("%d", &m); //Input of the ticket numbers(order) that won
for(i=0;i<n;i++)
{
scanf("%s",&ticket[i]);
{
for(j=0; j<m;j++)
{
scanf("%s", &ticketWinnersj]);
}
if (j=i);
printf("%d", winners);
}
}
}
The thing is that I don't know how to print the tickets 1, 4 and 3. (I can choose which tickets that won with the input. So instead of 1, 4 and 3; I can choose 3, 5 and 1 respectively)