DCL 2015 errors

Could anyone tell me the errors in my code.
For DCL2015A: http://ideone.com/vDfk4t
For DCL2015B: http://ideone.com/3B8IjS
Both the answers weren’t accepted.

Thanks.