Created
September 25, 2017 17:15
-
-
Save PocasPedro/116838f88ba5462a339da75ab00f0616 to your computer and use it in GitHub Desktop.
Java Fundaments for Kids - Exercise 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Simple Program that prints the Speed of Light in meters per second. Coded by Pedro. | |
*/ | |
public class SpeedOfLight { | |
public static void main(String[] args) { | |
//I have used an integer because the needed value fits the range of an integer. I have not used a DataType wrapper here to keep it simple. | |
int sol = 299792458; | |
// Prints "The light speed is ... m/s" to the terminal window. | |
System.out.println("The light speed is: " + sol + " m/s!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment