I have 50 random questions, 1, 2,3... 50.. I want to show 5 questions to user, Let say user start, random 5 questions I need to show to user one by one.
Question should not repeat...
I am using .net core web api...
{
Math.Random...
}
In my question sometime it get duplicate question....means same question user getting again..
how can I manage this?
This can be achieved with a list.
Inside a loop that repeats 5 times:
This way, it won't be in the list for the next loops.
Example code: