answersLogoWhite

0


Best Answer

#include<stdio.h> #include<conio.h> main() { int f=1,i=1,n; clrscr(); printf("\n Enter factorial value"); scanf("%d",&n); for(;i<=n;i++) { f=f*i; } printf("\n The factorial value=%d",f); getch(); }

User Avatar

Wiki User

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

Wiki User

11y ago

To get the factorial of a number, "n", do one of the following:

1) Multiply all numbers from one to "n". To do this, assign the number 1 to the result, then write a loop (from 1 to n) that will multiply result by each of the numbers the loop counter assumes.

2) Another method is to use recursion. If n = 0, return 1; otherwise, the factorial of n is equal to n * factorial(n - 1).

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

Just try every factorial numbers (1, 2, 6, 24, 120 and so far) whether or not they divide the given number.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find greatest factor of a number which is a factorial number in c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write this expression as a factorial 87654321?

That's not the factorial of any number. For a start, the factorial of any number greater than or equal to 2 is even, because of the factor 2. The factorial of any number greater or equal to five ends with 0. Another answer: I suspect the questioner meant to ask how to write 8*7*6*5*4*3*2*1 as a factorial. If so, then the answer is "8!"


Write a recursive procedure to compute the factorial of a number?

#include &lt;iostream&gt; using namespace std; int main() { int i, number=0, factorial=1; // User input must be an integer number between 1 and 10 while(number&lt;1 number&gt;10) { cout &lt;&lt; "Enter integer number (1-10) = "; cin &gt;&gt; number; } // Calculate the factorial with a FOR loop for(i=1; i&lt;=number; i++) { factorial = factorial*i; } // Output result cout &lt;&lt; "Factorial = " &lt;&lt; factorial &lt;&lt; endl;


Programming to calculate a factorial number?

double factorial(double N){double total = 1;while (N > 1){total *= N;N--;}return total; // We are returning the value in variable title total//return factorial;}int main(){double myNumber = 0;cout > myNumber;cout


Write the Pseudocode to find the factorial of a number?

Pseudo code+factorial


How do find factorial using vbscript?

&lt;html&gt; &lt;script language="vbscript"&gt; n=cint(inputbox("Enter a number")) dim f f=1 if n&lt;0 then Msgbox "Invalid number" elseif n=0 or n=1 then MsgBox "The factorial of given number "&amp;n&amp;" is :"&amp;f else for i=n to 2 step -1 f=f*i next MsgBox "The factorial of given number "&amp;n&amp;" is :"&amp;f end if &lt;/script&gt; &lt;/html&gt;

Related questions

What is the greatest factor of 187?

The greatest factor of any number is the number itself.


What is the second greatest factor of any number and how does this relate to the greastest factor of any number?

The greatest factor of any number is the number itself. The second greatest factor of any even number is half the number. The second greatest factor of any composite number is the number divided by its smallest prime factor. The second greatest factor of any prime number is 1.


What is the greatest factor of 60?

The greatest factor of a number is the number itself. So, the greatest factor of 60 is 60.


What is the greatest factor not common factor?

The greatest factor of any positive number is the number itself.


What is the greatest factor of 90?

The greatest factor of any number is the number itself.


What is the greatest factor of 33?

The greatest factor of any number is the number itself.


What is the greatest factor of 66?

The greatest factor of any number is the number itself.


What is the greatest factor of the number 36?

Every number is the greatest factor of itself.


What is the greatest factor of 144?

The greatest factor of any number is the number itself.


What is the greatest factor of 450?

The greatest factor of any number is the number itself.


What is the greatest factor of 46?

The greatest factor of any positive number is the number itself.


How can I find a greatest factor of 96?

The greatest factor of any number is the number itself.