problem with large number factorial calculation

This is a discussion on problem with large number factorial calculation within the C++ Programming forums, part of the General Programming Boards category; I need to calculate 100!. And I want to use vector instead of array. Can anybody give me an example ...

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    1

    problem with large number factorial calculation

    I need to calculate 100!. And I want to use vector instead of array.

    Can anybody give me an example of vector. So that I can try it for calculate 100!. I'm using Turbo C.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,532
    Interesting, did you join this forum because it features highly in mentions of "Turbo C" ?

    FWIW, your compiler is obsolete.

    Try something developed AFTER the standards were released, and up to date for your operating system.
    Microsoft Express Downloads - Visual Studio Express and SQL Server Express
    Code::Blocks
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Neither vectors nor arrays are going to help you calculate 100!, that is, unless you are writing a bignum library. In which case, you should already know how vector works.

    If you are not writing a bignum library, then that's what you need to be looking for. GMP is the best for Linux. iMalc's is the easiest, IMHO, to use on Windows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SMS, PDU, and Alphanumeric Type of Number Problem
    By audinue in forum Tech Board
    Replies: 0
    Last Post: 12-02-2010, 10:27 PM
  2. Adding a Large number digit by digit
    By mejv3 in forum C Programming
    Replies: 1
    Last Post: 09-14-2007, 03:28 AM
  3. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 04:25 AM
  5. Assingnment problem
    By Jason in forum C Programming
    Replies: 1
    Last Post: 08-31-2001, 01:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21