package com.codegym.task.task04.task0425;
/*
Target locked!
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in)) ;
String y=bf.readLine();
String x=bf.readLine();
int a=Integer.parseInt(x) ;
int b=Integer.parseInt(y) ;
if(a>0&&b>0) System.out.println("1");
else if(a<0&&b>0) System.out.println("2");
else if(a<0&&b<0)System.out.println("3");
else if (a>0&&b<0) System.out.println("4") ;
}
}
please tell me my false
Under discussion
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
J H U X
17 January 2021, 20:11
You have swapped your x and y, so therefore integers a and b are also swapped. This will get you false results.
0
Rich
21 April 2020, 07:30
missing some curly brackets for your statements
0
Marina Ivanova
8 December 2019, 19:48
I can see that you first read String y and then convert it into int and save as "b", but the first number you get from keyboard should be "a".
0
Guadalupe Gagnon
7 December 2019, 17:21
cant help unless you attach your solution
0