hello everyone can someone help me about array plsss i really need help right now
using one-dimensional array. create a program that will count the number of the same intries in a series number based on the user specific no. to count
EXPECTED output
Enter no.1:2
Enter no.2:1
Enter no.3:1
Enter no4:2
what number to v=count?1
total number 1 is 2
since you want to use arrays, you need to set up an array
like this:
datatype Name[size];
example: int MyArray[5]
next save the users input in the array.
you use its elements like this MyArray[0] to MyArray[size-1]
then use a loop to run through all elements of the array and use if to compare them with the number you want to count. if the if statement is treu increase your counting number.