About
package snippet;
import java.util.Scanner;
public class ccc12j1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int speedLimit = sc.nextInt();
int yourspeed = sc.nextInt();
int over = yourspeed - speedLimit;
if (over<=0)
System.out.println("Congratulations, you are within the speed limit!");
if (over>=1 && over<=20) {
System.out.println("You are speeding and your fine is $270.");
if (over>=21 && over<=30)
System.out.println("Congratulations, you are within the speed limit!");
if (over>=31)
System.out.println("You are speeding and your fine is $270.");
}
}
}