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...

well then,

what actually is wrong with your output? Why not posting this?

Knowing your compiler would be a great help too. Indeed, there are such twerps still not knowing long double. Also there are some convention such as l or L or typecasting when processing long double.

-- tesu

First of all, U hv not provided the whole code. I mean u hv left the initial few lines frm ur code. U need to include <float.h> to get an access to the Macros. Also main itself is missing ???
Secondly, what is ur problem output, as I am not getting anything wrong with it.

Specify ur problem clearly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.