I am working on program assignment in structures (c language)after entering the required integers the add function will not compile.I receive error messages I am using a Microsoft c, c++ 6.0 compiler. The help required is to provide a working add function in c. Hopefully after that I will be be able to write similar functions to subtract multiply and divide.© BrainMass Inc. brainmass.com November 24, 2022, 11:38 am ad1c9bdddf
The solution is attached.
<br>The given problem requires that an add function be provided that should add two given lists n and m. Please verify that the following steps are done in order to achieve the desired result.
<br>1. getinput1() is used to create the linked list of the first series of integers n.
<br>2. getinput2() is used to create the linked list of the second series of integers m.
<br>3. for each node (i.e each integer) of the first linked list n, create a new node of another list t, such that ...
The given problem requires that an add function be provided that should add two given lists n and m. The add function traverses the lists in order to add the contents. This is an excellent way of learning about the operation of C structures, in particular the application of Linked Lists in C. You can use the same concept to subtract, multiply or divide numbers, in effect build a calculator.