NVIDIA interview question

write a cpp program on factorial for which they provide you the template?