Turbo C programming - integers in C

This is a discussion on Turbo C programming - integers in C within the C Programming forums, part of the General Programming Boards category; How can I make the int in C limitless, meaning for example I can multiply 2 integers in billions and ...

  1. #1
    unregistered
    Guest

    Turbo C programming - integers in C

    How can I make the int in C limitless, meaning for example I can multiply 2 integers in billions and still get the correct integer answer. Please help asap...thanks.

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    As far as I know that's not possible, but you can use a long integer type (i.e. long num; instead of
    int num;) to give you more room to play with.

    starX
    www.axisoftime.com

  3. #3
    Unregistered
    Guest
    but our programming professor said that it is possible and even gave it to us as our project due this feb.15. The specs are we should be able to write a multiplication program that can always produce the result even if the given inputs or the result goes beyond the range of int and long int.

  4. #4
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    mmmmm......does your professor mean it's possible to store numbers in a character array and then multiply them together bit by bit and group them together again?

    a bit abstract....

  5. #5
    Unregistered
    Guest
    I was just thinking that I would create a structure and use link lists to connect the values. Is it possible this way? Does anyone have a source code for this so that I can pattern from it. If there is pls. email it to me ---> mayflwer888@yahoo.com thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 05:55 PM
  2. Assignment HELP!!
    By cprogrammer22 in forum C Programming
    Replies: 35
    Last Post: 01-24-2009, 01:24 PM
  3. Integers into array.
    By livestrng in forum C Programming
    Replies: 10
    Last Post: 10-29-2008, 11:35 PM
  4. Remember Turbo? It is comming back
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2006, 01:26 PM
  5. Replies: 6
    Last Post: 08-04-2003, 10:57 AM

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