0
In C++ language i had made a factorial computing small program . But it is not working well .plzz help
if I would put small inputs like 5,6,10 or even 20 . it works well but on putting higher numbers it computes wrong and gives 0 as an answer .plzz help ...it is in C++ language and tested both on smartphone as well as on pc .
9 Antworten
0
there is no issue with your logic if it's working for smaller number.. 20! is so long number which is not hold by int data type.. use data type as long long or long double and u will be done..
0
ohh thanks sir
0
sir did you joined some grp on whatsapp or any media where only coding purpose q/ans takes place .
0
I think this is the best platform to get answer from others or help to other if v know something which may help to other... For me, WhatsApp is for fun not for learning ...
0
sir is GNU compiler supports long long long data type ?
0
Below is official page:
https://gcc.gnu.org/onlinedocs/gcc/Long-Long.html
0
thanks alot sir .
0
sir always stay with us (learners) .
0
happy to help