Question: so i am doing Project Euler 13 for the 100 50 digit numbers. i need to make a function that will add the first 50

so i am doing Project Euler 13 for the 100 50 digit numbers. i need to make a function that will add the first 50 digits into a linked-list of 50 nodes from the for line of the text file where the numbers are. I need to add those first 50 numbers and then on the next line add the next 50 digit number to the previous link-list and do the additon. Example: link-list 113 is the first line from file and so the next line would be something like 765 so 1->1->3 + 7 6 5 = 8->7->8 would be my new linked-list. i need the funtion to print out the final summation of the 100 50 digit numbers and also print out the first ten digits of the final summation. both this prints must be done in same function. so i am doing Project Euler 13 for the 100 50 digit

int main() ifstream inFile; string line; NodePtr head = nullptr; unsigned int number; infile.open('nuns.txt'); if(infile.fail()) { cerr "Error unable to open filel" = 0 && number 9) add_head_1(head, number); infile.close(); cout = 0 && number 9) add_head_1(head, number); infile.close(); cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!