GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Oct-2009, 21:43
rahul89 rahul89 is offline
New Member
 
Join Date: Oct 2009
Posts: 1
rahul89 is on a distinguished road

Big integers addition using double linked lists


Build the first BigInt a;
Build the second BigInt b;
Perform +;

step 1 & 2- //Assume a space between three digits in the
// input
for (input)
{
Build a node of max 3 digits
Insert
}

step 3- //Use list’s iterator function
int n1, n2, s, c = 0;
BigInt result;
for (both lists not at the end)
{
n1 = a.getNext( );
n2 = b.getNext( );
s = a + b + c;
if (s have more than 3 digits)
{
c = 1;
s = s-1000;
}


Build a new node with s;
Insert new node to result;
}
Display items in result;
}
  #2  
Old 09-Oct-2009, 04:59
Mexican Bob's Avatar
Mexican Bob Mexican Bob is offline
Regular Member
 
Join Date: Mar 2008
Location: Chicxulub, Yucatán
Posts: 335
Mexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the rough

Re: need help for big integers addition using double linked lists


You obviously didn't read the GUIDELINES for posting help requests and you didn't actually pose any question or "request" for help. What is it about the minds of those who come here and repeatedly do this that prevents them from seeing the emboldened READ THIS >>> or even asking questions?


MxB
 
 

Recent GIDBlogInstall Adobe Flash - Without Administrator Rights by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solve Linear equation using VB deedex Miscellaneous Programming Forum 1 30-Nov-2008 15:59
how do i reverse a circular double linked list swedenguy C Programming Language 0 07-Apr-2008 12:16
Powell Method EngineerFORhire C Programming Language 5 01-Oct-2005 01:34
Double output leanieleanz C++ Forum 1 11-Mar-2005 21:19
Quick help - redefinition error leanieleanz C++ Forum 1 08-Mar-2005 01:32

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:24.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.