Yes I am writing C. So.. to understand me I'll make a fast example:
Output:
Average of n numbers using arrays
Input number of elelments: 3
3 elements were entered
Element 1 = 3
Element 2 = 4
Element 3 = p <- here where user is typing a letter so.. I want the user to enter again
the same element, but I even want the below elements 1 and 2 to
appear again with (the same value were entered) so.. if I don't put
the loop at line 41 the program will look like:
Output:
Average of n numbers using arrays
Input number of elelments: 3
3 elements were entered
Element 3 = <- Directly from the third element and not showing the elements were
entered first.
I did the loop.. and the elements are showing up but I'm not sure how to write the 3rd argument of ine 41
Let's say line 41 will be like this:
|
printf("\n\tElement %d = %d\n", k, k + n);
|
where k+n is not the write thing. But the elements are showing up with not the write values
Output:
Average of n numbers using arrays
Input number of elelments: 3
3 elements were entered
Element 1 = 5 <- Element 1 and 2 shows up as I use that loop but they don't have
Element 2 = 6 <- the right values..
Element 3 = 5
Well I don't know if anyone understand what do I want to do .. but is noting more then showing the right values of the elements that were entered first.