See this your code enters an infinite loop during calculating FACT(10) due to which you are getting TLE:
try changing the printing loop its not working on ideone although its working fine on my compiler XiZDCp - Online C++ Compiler & Debugging Tool - Ideone.com
this is the corrected code
i find problem in looping… I think you have created unnecessary nested loop while calculating for temp and trying to store it in a[m++].
i find problem in looping… I think you have created unnecessary nested loop while calculating for temp and trying to store it in a[m++].
Thanks a lot…:))
Thanks a lot…:))