I'm having some trouble with the output here...can anyone help me...learning how to use to C language, more of a C++ programmer...i tried using all sort of declaration but the output is still the same...
int i;
float x = FLT_MAX - (2.0);
double y = DBL_MIN - (2.0);
long double z = LDBL_MAX -(2.0);
printf("==================================\n");
printf("Inside Loop 1\n");
for (i=1; i<=5; i++) {
x = x + 1.0;
y = y - 1.0;
z = z + 1.0;
printf("i = %d \t x = %f \n", i, x);
printf("i = %d \t y = %e \n", i, y);
printf("i = %d \t z = %Lf \n\n", i, z);
}
x = x - 100.0;
y = y + 100.0;
z = z - 100.0;
printf("After Loop 1\n \t x = %f \n\n", x);
printf("After Loop 2\n \t y = %e \n\n", y);
printf("After Loop 3\n \t z = %Lf \n\n", z);
}
thanks guys...