can you guys check this array problem??

im working on this like 30 hours.. sigh.. but this is still having lot of problems..

write a program so that user can use it to input, compute, and display various statistics for a list of at least 3 values(display an error message and stop the program if fewer than 3 values were entered) and up to 20 positive values between 0.0 and 100.0 of type double (reject invalid values and continue with next value). also input another array from the list below as another test case.

or the <> button in the edit/reply
You should also try to indent it is very hard to read it like that.
btw you are calling the function programinfo() but you never actually did anything with the function so that's pointless. Your input method also is ill formed and is probably supposed to be a semi-colon not a comma I am pretty sure you have a couple of syntax errors. Oh and your while statement could be better you say if its not -1 but don't think about -2, -1.2 ect..so why not try something like if it's less than 0? and ps with doubles it will never be exactly -1 it will probably be like -1.0000000000000001 or something. Happens when you use doubles. Btw on your input you are saying it can only be 1-99 not 0-100 you would have to do greater than -1 and less than 101 or greater than or equal to 0 and less than or equal to 100 to get a range of 0-100 ps might want to use a do/while loop to get the 20 inputs.
eg

yeah i know i deleted programinfo() and when i checked there was no syntax errors. but i wanna learn how to utilize functions of "input a list of values and input ( void inputList(double a[], int &n)" and "validate one value (reject bad value other than -1.0 ( double inputValue(); )"
and yeah thanks for your helping but i dont know that code didnt work well..

This one worked. thanks for suggestion to use do while. but there are two problems. if i put that codes which is in inputValue module in main module, this program worked. however when i call the inputValue(), this program doesnt work. and when i enter -1, program is stopped but i can see -1 with comment.

a as default value: 0
a after referenceFunction: 1
a as default value: 0
a after returnFunction1: 1
a as default value: 0
a after returnFunction2: 1
Process returned 0 (0x0) execution time : 0.195 s
Press any key to continue.