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?
Printable View
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$