I am trying to build a very simple average speed formula one that takes the input of miles and hours and gives the average speed per hour. Bear with me because I literally started learning Java yesterday. I am not trying to do decimals or anything I just want to get a straight result from the formula.

```
public class AverageSpeed {

    public static void main(String[] args) {

        System.out.println("Please enter the distance you travelled in miles: ");

        Scanner sc = new Scanner(System.in);

        String Miles = sc.nextLine();

        System.out.println("Please enter the time in hours, it has taken to travel this distance. ");

        Scanner sc = new Scanner(System.in);

        String Hours = sc.nextInt();

        int distance = Integer.parseInt(Miles);

        int time = Integer.parseInt(Hours);

        int averagespeed = distance / time;

        System.out.println("You were travelling an average speed " + averagespeed + " miles per hours.");

    }
}

```

I'm getting the error message: `duplicate local variable sc`. I know I'm using the scanner completely wrong. I have no idea how to fix the scanner part and get the formula working. And I don't have enough experience to fix or completely understand the commands yet.