Created
November 13, 2015 15:32
-
-
Save nickpettican/e07bb070992876477c95 to your computer and use it in GitHub Desktop.
Java Session01
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
package session01; | |
import java.util.Scanner; | |
public class calc { | |
public static void main(String[] args) { | |
Scanner keyboard = new Scanner(System.in); | |
double mol, mass, result; | |
System.out.println("Please enter molar concentration (mol/L):"); | |
mol = keyboard.nextDouble(); | |
System.out.println("Please enter molar mass (gr):"); | |
mass = keyboard.nextDouble(); | |
result = mol*mass; | |
System.out.println("The mass concentration is: " + result + " g/L"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment