Answer the question
In order to leave comments, you need to log in
Why doesn't my float count correctly?
#include <stdio.h>
#include <Windows.h>
int main() {
int i = 1, j = 1, s1 = 1, s2 = 1;
float y;
y = 1. / (s1 + s2);
while (i < 50)
{
i++;
s1 += i;
while (j<10)
{
j++;
s2 += j;
}
}
printf("Y = %g", y);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question