public static void main(String[] args) {
double x;
double y;
Scanner scan = new Scanner(System.in);
System.out.println("Введите х:");
double user = scan.nextDouble();
if(user > 0){
double a = Math.sin(2) * user;
System.out.println(a);
}
else {
double b = 1 - 2 * Math.sin(Math.pow(user,2));
}