0

I need some help with these

https://www.sololearn.com/coach/595?ref=app why is not working? the output it's OK but fails... it work but didn't give me my XP

13th Oct 2020, 9:01 PM
Franco MartĂ­n Pueyo Meyer
Franco MartĂ­n Pueyo Meyer - avatar
7 Answers
0
Franco MartĂ­n Pueyo Meyer we cannot see your code from the link provided. You'll need to paste your code here or in code playground and link to it.
13th Oct 2020, 9:41 PM
MaddieL
MaddieL - avatar
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); int firstBadGuy = read.nextInt(); int secondBadGuy = read.nextInt(); //tu cĂłdigo va aquĂ­ for (int x=1; x<=7; x++){ if(firstBadGuy==x){ System.out.println("Bad Guy"); }else if(secondBadGuy == x){ System.out.println("Bad Guy"); }else{ System.out.println("Good Guy"); } } } }
13th Oct 2020, 9:43 PM
Franco MartĂ­n Pueyo Meyer
Franco MartĂ­n Pueyo Meyer - avatar
0
thanks
13th Oct 2020, 9:43 PM
Franco MartĂ­n Pueyo Meyer
Franco MartĂ­n Pueyo Meyer - avatar
0
What's the expected output?
14th Oct 2020, 3:00 AM
Aleksandrs
Aleksandrs - avatar
0
same as the result..... that's the problem
14th Oct 2020, 7:18 AM
Franco MartĂ­n Pueyo Meyer
Franco MartĂ­n Pueyo Meyer - avatar
0
All tests passing? If not, can you paste the exercise here?
14th Oct 2020, 8:32 AM
Aleksandrs
Aleksandrs - avatar
0
all test has the same result than the expected output... but it's wrong
14th Oct 2020, 6:11 PM
Franco MartĂ­n Pueyo Meyer
Franco MartĂ­n Pueyo Meyer - avatar