i made a factorial program and the only thing i need to do is to validate:
Whether it is empty or it contains letters
Here's the code:
program factorial; uses wincrt; var counter:integer; number:integer; total:longint; Begin write('Enter your number '); readln(number); total:=1; counter:=1; while (counter<=number) do Begin total:=(total*counter); counter:=(counter+1) end; Writeln('Factorial=',total); end.
any help will be apreciated. Thanks