answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: Factorial of a given numbers in unix using c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is UNIX SEQ?

I don't know about a SEQ command, but the 'seq' command in Unix will print a sequence of numbers from first to last, with a given increment. Use the 'man seq' command to find out how to use it.


What is the program to calculate factorial value of given number using BC command in UNIX?

From the manpage of the bc(1) command: The following is the definition of the recursive factorial function. define f (x) { if (x <= 1) return (1); return (f(x-1) * x); } So you could enter that definition of f(), and then call it, for example f(10)


How can you debug a C program in Unix?

You can debug C programs using gdb on Unix.


Are there still people using unix?

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


Shell script that accepts a file name starting and ending line numbers as arguments and display all the lines between the given line numbers?

i=1 while [ $i -le $# ] do grep -v Unix $i > $i done


Unix script to calculate average of n numbers given by user?

You really don't want to do this in a shell script - scripting languages in Unix typically do not handle or work with floating values, only integers. A better way would be to write a program to do this that works under Unix, such as a 'C" program. See the related link for an example


How do you find a factorial using Unix?

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.


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.


What is SEQ?

I don't know about a SEQ command, but the 'seq' command in Unix will print a sequence of numbers from first to last, with a given increment. Use the 'man seq' command to find out how to use it.


How do you create dummy file in unix?

using touch command of UNIX. syntax touch <filename> will create dummy regular file.


How do you transfer files from unix to windows?

Unix files can be easily transferred to windows via a network connection either by using FTP or by using Samba. Samba allows a Unix file system to be mounted/shared on a Windows system to look like a windows directory.


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.