answersLogoWhite

0


Best Answer

perl -e 'sub f { my $fu = shift; return 1 if $fu == 1; return f($fu - 1) * $fu; } print f(5), "\n";'

just paste that in to a command prompt, change the print f(5) to print f(6) or whatever you want.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

bc(1)
See the manual, there is an example for factorial.
check bellow link
http://bashscript.blogspot.com/2009/10/shell-script-to-find-factorial-of.html

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

A program to generate N factorial results.

This answer is:
User Avatar

User Avatar

Anonymous

Lvl 1
3y ago

ncnfcj

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find a factorial using Unix?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

In unix how will you find extension of file using commands?

Unix files do not rely on extensions, therefore there is no command to find them.


By using call by reference find the factorial of a number?

chutia mc,bc bhosdika


How do you find which unix flavor we are using?

Use the 'uname -a' command. It reports on the Unix system, version, machine name, amongst other things.


Write the Pseudocode to find the factorial of a number?

Pseudo code+factorial


Algorithm to find factorial using functions?

factorial using recursion style in c++ is unsigned int fact(unsigned int a) { if (a<=1) return 1; else { f*=fact(a-1); return a; } } when using looping structure factorial is unsigned int fact (unsigned int n) { unsigned int i,f=1; for(i=1;i<=n;i++) f*=i ; return f; }


How do you Find size of a file using c program?

OS-dependent.stat for unix, FindFirstFile for Windows.


Program to find n th fabonacci number?

#include #include using std::cin;using std::cout;using std::endl;using std::tolower;long factorial(const int& N);int main(){int N = 0; //factorial of Nchar command = 'n';do{cout > N;cout


How you can find a factorial of a number without using multiple operator?

If you really wanted to do this, you could simulate multiplication with repeated addition.


How can you debug a C program in Unix?

You can debug C programs using gdb on Unix.


Flowchart to find factorial of a given no?

Kat


Jntu 2-2 oops through java answers?

write a java program to find factorial using recursive and non recursive


Are there still people using unix?

Yes, quite a bit of companies and users use unix.