Dart program for factorial of a number

Raushan Jha
1 min readSep 13, 2019

--

Dart program to find factorial of a number: entered number is checked first if it is negative, then an error message is printed. You can also find factorial using recursion, in the code the variable fact is an integer so only factorial of small numbers will be correctly displayed, which fits in 4 bytes. For large numbers you can use long data type.

--

--

Raushan Jha
Raushan Jha

Written by Raushan Jha

MOBILITY COE HEAD at Think AI Labs LLC.I love to teach the ways of Android & iOS through either java or Flutter.

No responses yet