SHARE
TWEET

task5 nwm juz ktore

Mary_99 Mar 28th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top