This is the error I get;

**parse error before ' ( ' token**. On line 32.

I googled and searched here to see if anyone had similar problem and couldn't find an answer. I have typed all the semi-colons where they are supposed to be and the brackets seem to be correct also. So, what's up? Do I have to add a new "#include?"

Thanks.

Never mind, I found out that it was the semi-colon, but now there is another problem. They are listed below.

**Problem 1**

After compiling it and executing the program. Let say I enter 3 numbers in a series, along with the terminated character, of numbers and then hit enter; but for some reason, right after I hit enter, "Enter number:" appears 3 times then prints out all the mean, sum, etc.

**Problem 2**

In the end, whenever I type in "y" to continue, it goes in an never ending loop instead of asking "Enter number:" back in the beginning. I looked at my professor's notes and did the same thing for this loop. I made sure the brackets are correct and etc, and can't figure out why it isn't going back to the beginning.[/size]

Thanks.

#include <stdio.h> #include <math.h> int main(void) { double number = 0; int count = 0; char answer; double max = 0; double min = 9999; double sum = 0; double vsum = 0; double mean = 0; double vari = 0; double devi = 0; do { do { printf("Enter numbers: \n"); scanf("%lg",&number); } while (number > -1) { count++; if (number > max) max = number; else if (number < min) min = number; sum += number; vsum += number * number; } mean = sum / count; vari = (vsum / count) - (mean * mean); devi = sqrt(vari); printf("You entered %i numbers \n", count); printf("Maximum value entered: %g \n", max); printf("Minimum value entered: %g \n", min); printf("Sum of all the values read: %g \n", sum); printf("Mean of all values: %g \n", mean); printf("Variance of all values: %g \n", vari); printf("Standard Deviation of all values: %g \n", devi); printf("\nWould you like to do it again (Y/N)? "); scanf(" %c",&answer); } while (answer!='N'); return 0; }

This post has been edited by **kyeong**: 23 May 2008 - 11:43 PM