0
Why test case 3 always gone wrong ! Please tell me what is wrong with my code
https://www.sololearn.com/coach/21?ref=app import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner in = new Scanner(System.in); int point = in.nextInt(); int price = in.nextInt(); int ticket = point / 2; if(ticket > price) { System.out.println("Buy it!"); } else System.out.println("Try again"); } }
1 Answer
+ 1
You receive a ticket for every 12 points...
Edit:
And what happens when you gain 12 points and the gun costs 1 ticket???