Project: Physical Constants
Write a program that defines and prints the values for the following physical constants:
- Speed of light in vacuum (c)
- Planck constant (h)
- Newton's gravitation constant (G)
- Elementary charge (e)
- Avogadro constant (L)
- Boltzmann constant (k)
Use named constants for all values.
See: [[List of physical constants]]
Output
$ rustc PhysicalConstants.rs
error[E0308]: mismatched types
--> PhysicalConstants.rs:7:22
|
7 | static C_M_PER:f64 = 299792458;
| ^^^^^^^^^
| |
| expected `f64`, found integer
| help: use a float literal: `299792458.0`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.