answersLogoWhite

0

factor NUMBER

Example:

$ factor 815

815: 5 163

I think he meant more along the lines of the product of the numbers that add up to the number from 1.

So like this:

10! = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1

Unfortunately, I have not been able to find any command that does factorials. The 'bc' command would have been the perfect choice because of its abilities to calculate extremely high values like 2^1000. How ever since you know how factorials work (multiplication), you can actually just make one for yourself.

The commands:

let, bc, expr, [], etc are helpful for mathematical expressions in bash

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach

Add your answer:

Earn +20 pts
Q: Linux command to find factorial of a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp