hi i'm new to c and have never run into this error before and i'm a little confused as i dont believe i have declared any int's in my program at all however on likes 13, 14, 22, 23, 24, 35, and 40 i get array subscript is not an integer my code is as follows.
#include <stdio.h>
int main(int argc, char const *argv[])
{
double mint[8];
double gum[8];
double count = 1.0,num,sum=0.0;
while(count <= 8)
{
printf("please enter a number");
scanf("%d",&num);
mint[count]=num;
printf("%d\n",mint[count] );
count++;
}
count = 1;
while(count<=8)
{
sum += mint[count];
gum[count] = sum;
printf("%d\n",gum[count] );
count++;
}
count = 1.0;
sum = 1.0;
while(count<=8)
{
while(sum<=8)
{
printf("%d",mint[sum] );
sum++;
if (sum==8)
printf("\n");
}
printf("%d",gum[count] );
count++;
}
return 0;
}
i dont believe i have declared any int's in my programYeah, exactly. That's what the error is moaning about.