I have a problem printing only one of each number that the user inputs.
If the user inputs 20 number 10 it prints the 10 but also 19 other garbage numbers. How can i solve my issue?
Here is my code.
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("This program asks the user for 20 numbers between 10-100.\n"); // description of program
printf("Then detemines which numbers have been repeated\nand displays one of those numbers.\n\n");
int numbs[20], counter2, counter, size = 20; // variables
for(counter = 0; counter < size; counter++)
{
printf("Please enter 20 numbers between 10 - 100: "); // ask user for numbers
scanf("%d", &numbs[counter]);
}