Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.*;
- class TASK5
- {
- public static void main(String[] args)
- {
- String vectorLength1;
- String vectorLength2;
- Scanner sc = new Scanner(System.in);
- System.out.println("Enter vector 1 = " );
- vectorLength1 = sc.nextLine();
- System.out.println("Enter vector 2 = " );
- vectorLength2 = sc.nextLine();
- /*vectorLength1 = Math.sqrt(Math.pow(x1,2)+Math.pow(y1,2));
- vectorLength2 = Math.sqrt(Math.pow(x2,2)+Math.pow(y2,2));
- if(vectorLength1 == vectorLength2)
- {
- double sum = vectorLength1 + vectorLength2;
- System.out.println("Sum of the vectors is equal to " + sum);
- }else System.out.println("Vectors are not equal !!! Please try again enter the vectors");*/
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement