When I run my this program, after day 18 it gives me negative numbers. Where it should be positive. Can someone tell me why?
I'm just preparing for my test.
Code:#include <stdio.h></stdio.h> int main () { int loop_counter = 0; int algea = 1000000; int sum = 0; while (loop_counter<150) { sum=sum*1.5+algea; loop_counter= loop_counter+1; printf ("Day %d\t Total algea %d\n",loop_counter, sum); } return 0; }