Advertisement
Mary_99

task5 nwm juz ktore

Mar 28th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.util.*;
  3.  
  4. class TASK5
  5. {
  6.   public static void main(String[] args)
  7.   {
  8.     String vectorLength1;
  9.     String vectorLength2;
  10.  
  11.     Scanner sc = new Scanner(System.in);
  12.  
  13.     System.out.println("Enter vector 1 = " );
  14.     vectorLength1 = sc.nextLine();
  15.  
  16.     System.out.println("Enter vector 2 = " );
  17.     vectorLength2 = sc.nextLine();
  18.  
  19.   /*vectorLength1 = Math.sqrt(Math.pow(x1,2)+Math.pow(y1,2));
  20.     vectorLength2 = Math.sqrt(Math.pow(x2,2)+Math.pow(y2,2));
  21.  
  22.         if(vectorLength1 == vectorLength2)
  23.         {
  24.           double sum = vectorLength1 + vectorLength2;
  25.           System.out.println("Sum of the vectors is equal to " + sum);
  26.  
  27.         }else System.out.println("Vectors are not equal !!! Please try again enter the vectors");*/
  28.       }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement