assigning a large float number in E notation
hi,
how do you assign a large flatoing point number in C, is the syntax below correct? float number1 = 2.302E-12; //delcare & assign . . . . printf("%f", number1); when i went to print it out all i got was '0.000000' thanks :) |
Code:
float number1 = 2.302E-12 |
Re: assigning a large float number in E notation
Quote:
Either printf if in E-notatation: Code:
printf("%E\n", number1); Code:
printf("%.15f\n", number1); |
enemorales yes i meant large as in small. :p
thanks both you, very helpful! |
All times are GMT -5. The time now is 05:12 PM. |