Thank you, everyone. Actually, I am attempting an exercise of array. It has to be 2 unknowns. Whether any 1 of the content of the array is excess or not is not important here. The code is like this:
Code:
int array1[10],array2[10];
//user input size1(0-10) of array1
//user input a list of integers to array1(no. of integers=size1)
//user input size2(0-10) of array2
//user input a list of integers to array2(no. of integers=size2)
//display the content of array1 & array2 alternately
If I use 1 unknown and any 1 of the arrays has empty content, wrong code will be output.
This is the screenshot of the unwanted output and only 1 unknown is used here:
http://img213.imageshack.us/img213/5849/unwantednw8.jpg
If the empty content can be prevented from being displayed, then 1 unknown is enough but I just have no idea.