0

Who can help pls

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(); //your code goes here for(int x=0;x<4;x++) firstBadGuy += x; for(int y=0;y<1;y++) secondBadGuy += y; } } }

27th Mar 2022, 8:57 AM
MR KINGSHOW
MR KINGSHOW - avatar
5 Answers
+ 1
MR KINGSHOW What you want to achieve?
27th Mar 2022, 8:58 AM
AĶ¢J
AĶ¢J - avatar
+ 1
MR KINGSHOW There are 7 cards, 5 for good guys and 2 for bad guys. So there are 2 inputs for bad guys which are the position of cards So use for loop till i <= 7 and print "Badguy" and "Goodguy" Remember i should start from 1 not 0
27th Mar 2022, 9:28 AM
AĶ¢J
AĶ¢J - avatar
0
AĶ¢J sample output is Badguy Goodguy Goodguy Badguy Goodguy Goodguy
27th Mar 2022, 9:10 AM
MR KINGSHOW
MR KINGSHOW - avatar
0
Using for loop
27th Mar 2022, 9:10 AM
MR KINGSHOW
MR KINGSHOW - avatar