Home>
#include<stdio.h>
int main(void) {
  int i=1, sum=0, g=0, j=1;
  printf("Complete number under 1000 is \n");
  while (i<= 1000) {
    while (g<i) {
      if (i %g ==0) {
    sum += g;
      }
      g++;
    }
    if (sum == i) {
      printf("%d = ", i);
      while (j<i) {
    if(i/(double)j ==2.0) {
      printf("%d\n", j);
    } else if (i %j ==0) {
      printf("%d + ", j);
    }
    j++;
      }
      j=1;
    }
    g = 1;
    i++;
    sum = 0;
  }
  return 0;
}


When I execute the above code, it can be executed in VScode without any problem, but in the virtual box, "Fixed point operation exception" is output and it cannot be executed correctly. Please tell me the reason.