CodePudding user response:
You can determine the array element is null is not null, you output againCodePudding user response:
You can initialize a particular impossible assignment value as the initial value, the output is not only for the value of dataCodePudding user response:
To see what kind of data is that you put in it? Is greater than 0 data such as put in, you can put the array initialized to 0, and then put it in, the final output, output only non-zero value,Can also define an array, used to hold the assignment of the array subscript, so according to the output that is assigned a value assignment subscripting,
Can you understand these two methods?
CodePudding user response:
Method a, to initialize an array impossible value, an effective data to judgment,Method 2, the use of another array, to mark the corresponding data whether early assignment,
Method 3, the use of structure, a stored data effectively, a used to mark is assigned, the final definition structure arrays, specific what kind of method is used according to actual condition decision,
CodePudding user response:
Several, put in the time of counting the loop to a few, not output, estimates that your request is not that complicated