DCL 2015 errors

Could anyone tell me the errors in my code.
For DCL2015A: http://ideone.com/vDfk4t
For DCL2015B: 3B8IjS - Online C++ Compiler & Debugging Tool - Ideone.com
Both the answers weren’t accepted.

Thanks.