Test.com interview question

CPP program to factorial in java