- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hello, I've just wrote a small program to calculate the factorial of a given number. When i give a small number everything is ok but when i want t calculate the factorial of a biger number, like 53!, I get a wrong answer. I thing that the problec is the … | |
[code] #include <iostream.h> void prime_num(int num,int cut); void center_list(int primes[],int len, int c,int n); void main() { int N,C; cin>>N>>C; while(N>0) { prime_num(N,C); cin>>N>>C; } } void prime_num( int num,int cut) { int prime_list[169],k=0,i; bool isPrime=true; for(i=1;i<169;i++) { prime_list[i]=0; } for ( i = 1; i <= num; i++) { … |