+ 1
This is the program which show error that program is right that will post by fault.
2 Answers
+ 2
Your program doesn't now what is Scanner. It is located at an external component and you should indicate a place where this class can be found.
import java.util.Scanner
+ 2
There are 2 ways of solving your problem.
1. Add import java.util.*; at the top of the code.
2.Change Scanner sc=new Scanner(System.in); to var sc = new java.util.Scanner(System.in);