I have this code
void estadistica()
{
float suma=0,estadistic;
int i,j;
for(i=0;i<20;i++)
{
suma=suma+B[i];
}
estadistic=(B/suma)*100;
printf("El valor de tu pedido es %f",estadistic);
}
and it says in estadistica
error: invalid operands to binary / (have 'int *' and 'float')|
The variable B seems to be an array. In the following code :
estadistic=(B/suma)*100;
You are trying to divide an array (int *) by a float, which is not possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With