missing ';' before 'type'

In C language, the definition of variables can only be placed at the beginning of the function. It is recommended that you delete int and define the variable c at the front. In addition, i=0 in the if statement should be i== 0;

The correct programming is:

#include

#include

int main()

{

int a,s,i,b=10,c,d,sum;

int c=(int)pow(b,i); Here it says: error C2143 : syntax error : missing ';' before 'type' printf("Please enter the value of a:");

scanf("%d",&a);

printf( "Please enter the number of items:");

scanf("%d",&s);

i=0;

while(i<=s )

{

if(i==0){sum=a;}

d=a*c+sum;

sum+=d;

}

printf("%d\n",sum);

}

C language Data types are divided into the following types:

1. Basic types?

1. Integer types: int, short int, long int, long long int (C99), char, bool

2. Floating point types: float, double, double precision floating point type (float_complex, double_complex, long long_comples)

2. Enumeration type enum

3. Empty type void

4. Derived type?

1. Pointer type *

2. Array type []

3 , Structure type struct

4. ***Use body type union

5. Function type