For most of these examples, you must specify a precision for the format as well in order to meet typical project requirements for the course!
Students may add to this page if they feel so inclined.
C
1 printf( "%e\n", 0.003 );
Beware %g formatting, its precision field specifies the maximum number of digits to use. It will print $\frac{1}{2}$ as just 0.5.
C++
1 std::cout << std::scientific << 0.003 << std::endl;
Java
1 System.println( "%e" % 0.003 );
Other methods exist with DecimalFormat.
Python
Racket
1 (~r 0.003 #:notation 'exponential #:precision '(= 4))