Created
October 30, 2014 13:16
-
-
Save SniperProSerria117/c63ac7caf52bf4f92be6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package velocity; | |
import java.util.Scanner; | |
public class Velocity { | |
public static void main(String[] args) { | |
Scanner reader = new Scanner(System.in); | |
double Momentum; | |
double Mass; | |
double Velocity; | |
System.out.print("Enter mass: "); | |
Mass = reader.nextDouble(); | |
System.out.print("Enter velocity: "); | |
Velocity= reader.nextDouble(); | |
Momentum = Mass * Velocity; | |
System.out.print("The momentum is: "); | |
System.out.print(Momentum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment