0

¿How can i put a conditional en java into a result. I have tu put which are number compadres and wich not

Someone help me is to homework

26th Oct 2019, 7:49 PM
María Del Carmen Cidón Hernández
María Del Carmen Cidón Hernández - avatar
3 ответов
+ 1
do you basically have to compare two numbers, or what? 😅 (it's not really clear ...)
26th Oct 2019, 8:26 PM
Anton Böhler
Anton Böhler - avatar
0
I must put 2 numbers and if added in their result they give 1 and 0 they are compadres numbers if not then well and that is what I must do
26th Oct 2019, 8:38 PM
María Del Carmen Cidón Hernández
María Del Carmen Cidón Hernández - avatar
0
something like this? int num1 = -5 int num2 = 6 if(num1 + num2 == 0 || num1 + num2 == 1){ System.out.println(1); }else{ System.out.println(0); }
27th Oct 2019, 8:09 AM
Anton Böhler
Anton Böhler - avatar