This code i've written keeps showing an error "constant expression expected in function main". I'm not sure if the code i've written is on track.
#include<stdio.h>
#include<math.h>
#define MULTIPLY 1
int i,n;
int operation; int Answer = 1;
int main()
{
printf("You are welcome\n");
printf(" how many numbers do you want to multiply? \n");
scanf("%f",&n);
float x[n];
switch (operation){
case 'x':
for(i=0; i<=n; i++)
if (i<n)
printf("enter your value\n");
else
printf("enter the last value\n");
scanf("%f",x[n]);
for(i=0; i<=n; i++)
Answer = Answer * x[i];
printf( "The answer is %d", Answer);
break;
default:printf("sorry,this input is invalid");}
return(operation);
}