Return in the main function in c++

why there is a run error whenever I return -1 and 20 in the main function.

No you will not get any error if you return anything from main()

Return 0
Denotes that execution has done normally without any error