# Thread: i keep on getting an error and its driving me insane

1. ## i keep on getting an error and its driving me insane

Code:
```#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
double k,A,B,W,NumberOfSlices,Width,y,Area,Sum;

NumberOfSlices = 1200000.0;
A              = 10.0;
B              = 6.0;
Width          = A / NumberOfSlices;
k              = 0.0;
Sum            = 0.0;

while ( k < NumberOfSlices )
{
W = ( Width * ( k + 1 ));
y = ( B / A ) * sqrt( A * A - W * W ) ;
Area = y * Width;
Sum = Sum + Area;
k = k + 1;
}
printf("\n\t the area of the ellipse is %10.3f",Sum * 4);

printf("\n\n");
system("pause");
system("cls");

A              = 4.0;
k              = 0.0;
NumberOfSlices = 10.0;
Sum            = 0.0;
Width          = A / NumberOfSlices;

While ( k < NumberOfSlices )
{
W = ( Width * ( k + 1 ));
y = W * W;
Area = Width * y;
Sum = Sum + Area;
k = k + 1;
}
printf("\n\t the area of a parabola at x = 4 is %10.3f",Sum);

printf("\n\n\n");
}```
it keeps on saying im missing a ; before the { that follows directly after the second while command, but i dont see how that is possible. it never needed one there before. i put one there just ot humor it and it gives me an error on the while. so any help would be appreciated

2. Spot the difference:
Code:
`While`
Code:
`while`

3. This code is having error dude

Code:
```    While ( k < NumberOfSlices ) // this line c/c++ have while not While
{
W = ( Width * ( k + 1 ));
y = W * W;
Area = Width * y;
Sum = Sum + Area;
k = k + 1;
}```

4. ty vm