473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Program to find factorial of 100

Please tell me how to find factorial of 100 in c++
Oct 15 '09 #1
2 5187
Banfa
9,065 Expert Mod 8TB
Get a library that has a class that supports unlimited precision integers.

Do the calculation in the normal way.

You might try looking at the Boost library that is the sort of thing that they make.
Oct 15 '09 #2
donbock
2,426 Expert 2GB
According to Microsoft Excel:
100! = FACT(100) = 9.3 x 10^157
log-base-2(100!) = LOG(FACT(100),2) = 524.8

That is, you need 526-bit integer math to compute the factorial of 100.
Oct 15 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Eduardo78 | last post by:
Ok, this is what i am tying to do: I want to create a rutine that takes a value from a text box. Lets say for example 5. and does the following 5*4*3*2*1 = 120 the rutine should be able to...
33
by: patrick_woflian | last post by:
hey guys, im just writing a basic calculation at the moment, before building on it for an A-Level piece of work. i can add/divide etc... two numbers together yet i am having a major problem with...
13
by: ayman723 | last post by:
I wrote this program code : # include < iostream > # include < iomanip > using namespace std; unsigned long factorial ( unsigned long );
6
by: intro2Cpp | last post by:
Hello, I have been trying to figure out what I'm doing wrong on my program for two days. My professor keeps "forgetting" about me. It is due tomorrow. We are supposed to use the "summing...
59
by: Umesh | last post by:
i wrote the following program to calculate factorial: #include<stdio.h> #include<iostream.h> void main() { int i,n; long int p=1; // or long double p=1; for exponential result which I don't...
12
by: dynamo | last post by:
Hello everyone,i am a beginner in c++ and i am trying to write a program that outputs the factorial of a number in my own way,however i don't know why it's not working.Thanks for any help.This is the...
41
by: c | last post by:
Hi every one, Me and my Cousin were talking about C and C#, I love C and he loves C#..and were talking C is ...blah blah...C# is Blah Blah ...etc and then we decided to write a program that...
20
by: aarklon | last post by:
Hi all, can any one give a example program where recursive version is faster than iterative version ?
0
by: viza | last post by:
On Fri, 27 Jun 2008 11:27:24 -0700, munitech4u wrote: If you are stuck on your homework, here are good places to start: http://en.wikipedia.org/wiki/Permutation...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.