Again the same error. Code is working at my machine but not at your online IDE. I even added import.java.util.Scanner at the top?

Do I need to drop the scanner or hard code the value of n?

@sinuscoupon0s_4659768f9d9b587e The code that you have attached is working fine in Online IDE also a screenshot has been attached for reference. But your answer is wrong bcoz you haven’t added any space in the pattern so add a single Space in every SysO statement and your answer will be correct. Problems :
i)Remember Doubles quotes are used in SysO not single quotes bcoz SIngle quote represents char but you need two spaces which is not possible in char.(Line no. 21).
ii) Put. single space after you print val.
iii) Give double space when you need to give spaces.
Fully corrected code is given below :

Screen shot for reference :

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.