Advertisement
anasazhar

Untitled

Sep 12th, 2024
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Lab1{
  3.     public static void main(String[] args){
  4.         Scanner console = new Scanner(System.in);
  5.         System.out.print("Enter x1: ");
  6.         int x1 = console.nextInt();
  7.  
  8.         System.out.print("Enter y1: ");
  9.         int y1 = console.nextInt();
  10.  
  11.         System.out.print("Enter x2: ");
  12.         int x2 = console.nextInt();
  13.  
  14.         System.out.print("Enter y2: ");
  15.         int y2 = console.nextInt();
  16.  
  17.         console.close();
  18.  
  19.         System.out.println("The average of 2 and -1 is 0.5.")
  20.     }
  21.     public static double average(int x, int y){
  22.     }
  23.  
  24.     public static double slope(int x1, int y1, int x2, int y2){
  25.     }
  26.  
  27.     public static int difference(int x, int y){
  28.     }
  29.  
  30.     public static int square(int x){
  31.     }
  32.  
  33.     public static double distance(int x1, int y1, int x2, int y2){
  34.     }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement