Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Lab1{
- public static void main(String[] args){
- Scanner console = new Scanner(System.in);
- System.out.print("Enter x1: ");
- int x1 = console.nextInt();
- System.out.print("Enter y1: ");
- int y1 = console.nextInt();
- System.out.print("Enter x2: ");
- int x2 = console.nextInt();
- System.out.print("Enter y2: ");
- int y2 = console.nextInt();
- console.close();
- System.out.println("The average of 2 and -1 is 0.5.")
- }
- public static double average(int x, int y){
- }
- public static double slope(int x1, int y1, int x2, int y2){
- }
- public static int difference(int x, int y){
- }
- public static int square(int x){
- }
- public static double distance(int x1, int y1, int x2, int y2){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement