Whats wrong with my C++ codes?3 errors?declaration missing?-Collection of common programming errors

  • you forgot the # in your first line: #include as well you misspelt the second include #include your bracket is the wrong way around or is not needed { float maximum(float + []) }

    getch is undeclared. finish your code.

  • I have studied your programming and corrected the mistakes. Along side the new/corrected code,your old code is also retained as comments, so that you will know where you went wrong. #include // error # missing #include// spelling mistake //void main() – these two lines are unwanted //{ float maximum( float *f) // float maximum(float + []) { float max; int i; max =f[0]; // max=+[0]; do not initialise it to 0, //but initialise it to the first element for(i=1;imax)//if(+[i]>max) max = f[i];// max=+[i]; } return max; } float minimum (float *f)//float minimum(float +[]) { float min; int i; min=f[0];// min=+[0]; do not initialise it to 0, //but initialise it to first value for(i=1;i

Originally posted 2013-11-09 22:48:12.