Created
May 21, 2017 16:05
-
-
Save peter279k/d99ef67828408499a9cfd914c4da5ab5 to your computer and use it in GitHub Desktop.
TQC+ JAVA
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
import java.util.Scanner; | |
public class JPA01 { | |
public static void main(String []args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Please input:"); | |
int numOne = input.nextInt(); | |
int numTwo = input.nextInt(); | |
int numThree = input.nextInt(); | |
double avg = (double)(numOne + numTwo + numThree) / 3.0; | |
System.out.printf("Average: %.2f\r\n", avg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment