int main() { int i = 1, c = 0, sum = 1,j ; scanf("%d", &j);
while (i <= j) {
sum = sum + (i /3+i/5); printf("%d\n", sum); i = i +i/3+i/5; } }
i've tried to compile this program but my output is 1...and its doesnt stop. i dont know where my mistake is. my output should be; if i entered 3, then 1.00000, 1.3333 should come out
View All Comments
| View Tutorial