ok first of all, i hoping this readable,
Code:
int main()
{
int x;
int y;
int n;
int holdin;
int result=0;
printf("First Value =");
scanf("%d",&x);
printf("Divide Value =");
scanf("%d",&y);
printf("Looping Times =");
scanf("%d",&n);
for(int m=1;m<n;m=m+1){
holdin=x+(m-1)*y;
result=result+holdin;
printf("%d+",holdin);
}
holdin=x+(m-1)*y;
result=result+holdin;
printf("%d=%d",holdin,result);
}
wrong at this line after the curly brackets,
it says '-fpermissive' again like the older thread with loop problem that i began to with the loop problems,
the reason i am adding the new line after curly brackets it because
if the loop times was 5
it only count up 4 times because
Code:
for(int m=1;m<n;m=m+1)
int m=1 not 0 and the increment only 4 times with the final result m=5
but when i adding the line, "-fpermissive" thing comes up,
any ideas?