Hi need to know that if I have the following code:
float j;
j=.000004
instead of writing .000004 is there a short cut like Fortran 1.0e-6?
Hi need to know that if I have the following code:
float j;
j=.000004
instead of writing .000004 is there a short cut like Fortran 1.0e-6?
Have you tried it? If you had you'd find that 1.0e-6 worked just like you have it.
Code:itsme@itsme:~/C$ cat scientific.c #include <stdio.h> int main(void) { float f = 4e-6; printf("%f\n", f); return 0; }Code:itsme@itsme:~/C$ gcc -Wall scientific.c -o scientific itsme@itsme:~/C$ ./scientific 0.000004 itsme@itsme:~/C$
Last edited by itsme86; 05-12-2006 at 12:44 PM.
If you understand what you're doing, you're not learning anything.