Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Shavit Borisov
- // HW
- import java.util.Scanner;
- public class StudentHeight {
- public static void main(String[] args)
- {
- Scanner in = new Scanner (System.in);
- float StudentOne, StudentTwo;
- System.out.println("Enter the height of the first student: ");
- StudentOne = in.nextFloat();
- System.out.println("Ener the height of the second student: ");
- StudentTwo = in.nextFloat();
- System.out.println("The height difference between the students is" + Math.abs(StudentOne - StudentTwo));
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment