Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
factorial
- Page 1
Re: C language Factorial program...
Programming
Software Development
13 Years Ago
by rajeshneelam
factorial
of 700 in c
Re: C language Factorial program...
Programming
Software Development
13 Years Ago
by rajeshneelam
factorial
of 700 using c uSing arraAYS
Re: factorial function in a formula
Programming
Software Development
16 Years Ago
by vmanes
Factorial
function is really pretty easy - often used in any tutorial … using a loop is more efficient. Keep in mind that
factorial
grows very fast - depending on how many iterations your calculation… not be a suitable data type to return from your
factorial
function. And review your material on writing functions - you need…
Re: factorial using recursion
Programming
Software Development
11 Years Ago
by deceptikon
>
factorial
(x--,y*z,z++); You're passing the current value of x to
factorial
(), recursion never stops and you experience a stack overflow.
Re: Can't do factorial for numbers greater than 12
Programming
Software Development
16 Years Ago
by hammerhead
Factorial
of any number greater than 5 ends with a zero. …. If you can simple check at the end of the
factorial
that if it ends with 0 then you can reduce…
Re: please can any1 help fix this......
Programming
Software Development
14 Years Ago
by SeeTheLite
factorial
function: [code=c++] in
factorial
(int x) { int t; for(t = x; t >-;t++) x = x*t; return x; } [/code] I hope you read into function calling and creation.
Re: SUm up combos or choose r out of n
Programming
Software Development
17 Years Ago
by ~s.o.s~
Factorial
values may easily go out of hand and overflow due …
Re: java homework help
Programming
Software Development
13 Years Ago
by quuba
Factorial
is one argument operator, result is ready immediately. Summation - no. You need to define the end of sum operation
Re: SML beginner syntax problem.
Programming
Software Development
10 Years Ago
by sepp2k
… just an unidiomatic way to write `
factorial
10`, i.e. it calls `
factorial
` with the number 10 as its argument. The reason…
Re: For loop problem.
Programming
Software Development
11 Years Ago
by rdrahul809
//
factorial
prog. #include<iostream.h> #include<conio.h&…<=number;i++) { fact=fact*i; } cout<<"
Factorial
="<<fact<<endl; getch(); } //fibonacci series…
Re: How High Can We Count - Game
Community Center
Geeks' Lounge
17 Years Ago
by ~s.o.s~
factorial
(1) => 1
Re: Factorial Help
Programming
Software Development
12 Years Ago
by sirlink99
… down. So I wanted to keep the
factorial
method the same as what a
factorial
is, but it doesn't actually matter…
Re: Factorial Help
Programming
Software Development
12 Years Ago
by sharat90
you can also use recursion. [CODE]public int
factorial
(int n) { if((n == 0) || (n == 1)) return 1; else return n *
factorial
(n-1); } [/CODE]
Factorial Help
Programming
Software Development
12 Years Ago
by xiangzhuang
Hey guys, I have this HW for school for Java but I just can't seem to figure it out. I know I have to use a for loop for it but I just can't seem to figure out everything else. Thanks :D public int
factorial
(int n) { }
Re: Factorial Help
Programming
Software Development
12 Years Ago
by sirlink99
no. instead of adding you want to subtract. and the n is the
factorial
(in your case 7, so 7 x 6 x 5 x 4 x 3 x 2 x 1). so you want to use n in your for loop. and you want to decrement to follow the pattern. then your fact value if your answer, so the operation would look like this [CODE] fact = fact * n; [/CODE]
Re: Factorial Help
Programming
Software Development
12 Years Ago
by JamesCherrill
… adding you want to subtract. and the n is the
factorial
(in your case 7, so 7 x 6 x 5…
Re: Factorial Help
Programming
Software Development
12 Years Ago
by carlosreg
for(int i=o;i<=n;i++) { fact=fact*i; } take two variables for one for
factorial
and another for int initialize them u will get the ans
Factorial without recursion
Programming
Software Development
14 Years Ago
by Ajantis
Hey folks :) I was writing some code today, and I wrote a function for computing factorials without use of recursion. What do you think about this one? [CODE]int
factorial
(N) { int r; r = 0; while (N > 0) { r *= (n-1); n--; } return r; }[/CODE]
Factorial Calculation using VB.net
Programming
Software Development
12 Years Ago
by lili22
[B]Hello .. im a business student with a vb.net course .. donno why we're being taught vb but that's that .. any ways could anyone help me solve this problem: Develop an application which reads two integers n1 and n2 from the user via two textboxes and displays in a label the sum of the
factorial
of the integers n1 and n2[/B]
Re: Factorial
Programming
Software Development
13 Years Ago
by dipesh shrestha
[CODE]#include<stdio.h> int
factorial
(int); int main() { int n,f; printf("enter n\n"); scanf("%d",&n); f=
factorial
(int n); printf("the
factorial
of %d is %d\n",n,f); return 0; } int
factorial
(int n); { f=n*
factorial
(n-1); return f; }[/CODE]
Factorial
Programming
Software Development
13 Years Ago
by farhanafzal
Write a C program to find and print the product of
factorial
of numbers from N to M. Can anyone please give me an idea, how to solve this Question ? Thank you.
Re: Factorial
Programming
Software Development
13 Years Ago
by Narue
Start by learning how to calculate a
factorial
. Then translate that to code. Finally, do that on every value from N to M. Seriously, have you tried [I]anything[/I] yet?
Re: Factorial
Programming
Software Development
13 Years Ago
by farhanafzal
… the m { for(j=1;j<=i;j++)// for
factorial
{ mult=mult*j; } mult=mult*j; } printf("Mult : %d…
Re: Factorial
Programming
Software Development
13 Years Ago
by abhimanipal
… { mult=1; for(j=1;j<=i;j++)// for
factorial
{ mult=mult*j; } mult1=mult1*mult; }[/CODE] PS: Avoid using…
Re: Factorial
Programming
Software Development
13 Years Ago
by dipesh shrestha
#include<stdio.h> int main() { int n,i,f=1; printf("enter n\n"); scanf("%d",&n); for(i=1;i<n;i++) { f*=n*i; } printf("the
factorial
of %d is %d",n,f); return 0; }
Re: Factorial
Programming
Software Development
13 Years Ago
by sannidhikumar99
[CODE]#include<stdio.h> #include<conio.h> void main() { int n,f; f=1; printf("Enter the number:\n"); scanf("%d",&n); while(n>0) { printf("%d",n); f=f*n; n--; } printf("The
factorial
of the integer is:%d",f); getch(); }[/CODE]
Re: Factorial
Programming
Software Development
13 Years Ago
by nbaztec
Yes, we all know that you all can Code
factorial
programs, but please don't give away your precious, one-…
Re: Factorial Calculator C++ issues
Programming
Software Development
13 Years Ago
by burgercho
… are multiple problems: You need a forward declaration of
factorial
since it is called before it is declared (add …the line 'int
factorial
(int input);' after the 'using...' line) You have to…to a variable): cout <<
factorial
(input) << endl; Also,
factorial
does not have a return statement to return…
Factorial Calculator C++ issues
Programming
Software Development
13 Years Ago
by jwebb
…to create a program to calculate the
factorial
of variable int input. I am … giving me an error saying "
factorial
was not declared in this scope"… endl; } else { cout <<
factorial
<< endl; } } int
factorial
(int input) { cin >> input;…
Re: Factorial Calculator C++ issues
Programming
Software Development
13 Years Ago
by jwebb
… code: [CODE] #include <iostream> using namespace std; int
factorial
(int input) { if(input == 0) { return 1; } else { return input… *
factorial
(input - 1); } } int main(int input) { cin >> input; …
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC