╨╧рб▒с>■  ■                                                                                                                                                                                                                                                                                                                                                                                                                                                   Root Entry         └Fрklши┴└╡°Б▌Y┬ АWordDocument    р.CompObj            jSummaryInformation(        `¤           $■                       )            ■       ■                               %&'(*+,-./0■                                                                                                                                                                                                                                                                                                                               Root Entry         └Fрklши┴└╡°Б▌Y┬ АWordDocument     /CompObj            jSummaryInformation(        `        ¤               ■                                    ■   ■    !"#1                                                    2345678■                                                                                                                                                                                                                                                                                               ▄еhWр 4eр.Ы&j&jj&j&j&j&j&╝&д&╝&╝&╝&╝& ╞&(╝&Й-1''''''''++++=Z+╘.,╘-║-X.╬ -ij&' '''' -k(j&j&'ю&#k(k(k('Zj&'j&'+`■нё└Y┬~&М&j&j&j&j&'+k(░k(CSCI 515 C/C++ Programming Spring 2002 Dr. Creider CLab 3 Assignment (In lab class) Adding large integers stored as groups of digits in an array Write a program to input two large numbers as character strings, store each number as groups of digits in a separate single dimension array, add two large integers and display the results. In the main program declare a character array of that has 256 elements in which to store the input string. Declare three long integer arrays that have 40 elements each. Write a loop to input a series of two large integer numbers (up to 255 digits each one string at a time) as character strings until the user enters the strinence Department{B['NormalComputer Science Department7MMicrosoft Word for Windows 95@0@ЪLъY┬@ЪLъY┬@оt▌Y┬░W■  ╒═╒Ь.УЧ+,∙о00HPhpx АИ Рф A&M-Commerced  ЕCSCI 515 C/C++ Programming Fall 2001■       └FMicrosoft Word Document MSWordDocWord.Document.6Ї9▓q■  рЕЯЄ∙OhлС+'│┘00Ша0<`lxИ м╕ р ь °  (фЕCSCI 515 C/C++ Programming Fall 20016~8Computer Sci▄еhWр De/Ы&j&jj&j&j&j&j&╞&д&"╞&╞&╞&╞& ╨&(╞&н-1'''''''''+)+)+)+=f+╘:,╘-▐-X6.╬,-Бj&' '''',-u(j&j&'°&#u(u(u('Zj&'j&''+└╡°Б▌Y┬~&М&j&j&j&j&''+u(▓u(CSCI 515 C/C++ Programming Spring 2002 Dr. Creider CLab 3 Assignment (In lab class) Adding large integers stored as groups of digits in an array Write a program to input two large numbers as character strings, store each number as groups of digits in a separate single dimension array, add two large integers and display the results. In the main program declare a character array of that has 256 elements in which to store the input string. Declare three long integer arrays that have 40 elements each. Write a loop to input a series of two large integer numbers (up to 255 digits each one string at a time) as character strings until the user enters the string УquitФ in place of a string of digits for the first number. Call a function to convert each string separately to groups of digits. Call a function to add the groups of digits. After the addition has been completed, print the two numbers that were added and the result that was produced. For example, the following numbers have been placed in groups of digits for adding. Array A first_groupA 99999997895425587458798752488521467Array B first_groupB 3548987987524532548755642874added together they produce the following result Array C first_groupC  100000001444413574983331301244164341 Before you call the function to add the groups of digits, test to determine which array has the largest number and pass that array as the first group of digits. The algorithm to determine this is given as follows. ALGORITHM if(first_groupA > first_groupB) // arrays may or may not contain the same number of groups of digits add(A, fir95425587458798752488521467Array B first_groupB 3548987987524532548755642874 added together they produce the following result Array C first_groupC  1000000000000001444413574983331301244164341 carry stored in new group to left carry added to 2 groups Groups same size, result has more groups because of carry Array A first_groupA 7895425587458798752488521467Array B first_groupB 3548987987524532548755642874 added together they produce the following result Array C first_groupC  11444413574983331301244164341 carry stored in new group to left Groups not same size, result has same number of groups as larger number Array A first_groupA  3577895425587458798752488521467Array B first_groupB 32548755642874 added together they produce the following result Array C first_groupC  3577895425587458831301244164341 2 groups copied Carry added Groups same size, no carry to new group Array A first_groupA  5587458798752488521467Array B first_groupB  987987524532548755642874 added together they produce the following result Array C first_groupC  993574983331301244164341 NOTICE DO NOT initialize any array elements to zero as part of your algorithm. It is not necessary and a waste of time to do so!! д╨/ер=ж╨з╨и╨йhк Fallts in an array.%Чo ш ЗИОМУФ'@DIX¤¤¤¤√∙¤ў¤¤¤¤ucc$cПЫ╝∙·╖╕$%&zЬЭЮЯабй▒╣┴╔╩чшщъыьэї¤ ?YZ[\■0*■0*√0*√0*■0*■0*■0*■0*■0*■0*Ё■0*Ё■0*Ё°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ▀uЁ■0*Ё°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ▀uЁ■0*Ё■0*Ё°uЁ°uЁ°uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(\]mu}ЕНХЦЧn o y Є i n ч ш p q   ЗИ:PНОП╨ъыьэюЎ■¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*т0*▀0*Ёт0*Ёт0*Ёт0*Ёт0*Ёт0*Ёт0*т0*т0*т0*т0*т0*Ёт0*▀▀0*т0*т0*Ё▀0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(<=>?@ABJRZbcdХп░▒▓┬╩╥┌тъЄє5678rПРСТУФХЭчuЁх0*ЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁчuЁх0*Ёх0*Ёх0*ЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁчuЁх0*Ёх0*Ёх0*Ёх0*Ё▀0*Ёх0*ЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(st_groupA, B, first_groupB, C, first_groupC, size) // size is the number of elements in each array (40) else add(B, first_groupB, A, first_groupA, C, first_groupC, size) // B has the most groups or same number of groups as A Write a function to take each string of digits and convert it to groups of integer digits (7 digits per group) stored in a long integer array. Use the function you wrote for Clab 2. Pass to the function each large integer number separately as a character string, the integer array, and assign the subscript of the array element that contains the first group of digits to the last argument. Write a function to add two large integer numbers and store the result in a third array. The algorithm to add these groups is given in a diagram on a separate page. Write a function to print the number stored in one integer array. Print the groups of digits so that there are no blanks between the digits in the long integer values. Use the function you previously wrote to output groups of digits in an array. You will have to modify this function so that you can print a minus sign before the number if the number is negative. Name the file you create, CLAB3. Do Not Use Any Global Variables. Save both the source (cpp file) and object code (exe) on your disk which is turned in at the end of the lab. Examples of Addition Adding large integers stored as groups of digits in an array Groups not same size, result has more groups than largest number Array A first_groupA 9999999999999978■    ■    ■                                                                                                                                                                                                                                                                                                                                                                                                                                                           95425587458798752488521467Array B first_groupB 3548987987524532548755642874 added together they produce the following result Array C first_groupC  1000000000000001444413574983331301244164341 carry stored in new group to left carry added to 2 groups Groups same size, result has more groups because of carry Array A first_groupA 7895425587458798752488521467Array B first_groupB 3548987987524532548755642874 addedDocumentSummaryInformation8             `                                     together they produce the following result Array C first_groupC  11444413574983331301244164341 carry stored in new group to left Groups not same size, result has same number of groups as larger number Array A first_groupA  3577895425587458798752488521467Array B first_groupB 32548755642874 added together they produce the following result Array C first_groupC  3577895425587458831301244164341 2 groups copied Carry added Groups same size, no carry to new group Array A first_groupA  5587458798752488521467Array B first_groupB  987987524532548755642874 added together they produce the following result Array C first_groupC  993574983331301244164341 NOTICE DO NOT initialize any array elements to zero as part of your algorithm. It is not necessary and a waste of time to do so!! д╨/ер=ж╨з╨и╨йhк Fallts in an array.if(first_groupA <%Чo ш ЗИОМУФ'@DIXi¤¤¤¤√∙¤ў¤¤¤¤ucc$cПЫ╝∙·╖╕$%&zЬЭЮЯабй▒╣┴╔╩чшщъыьэї¤ ?YZ[\■0*■0*√0*√0*■0*■0*■0*■0*■0*■0*Ё■0*Ё■0*Ё°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ▀uЁ■0*Ё°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ°uЁ▀uЁ■0*Ё■0*Ё°uЁ°uЁ°uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(\]mu}ЕНХЦЧn o y Є i n ч ш p q   ЗИ:PНОП╨ъыьэюЎ■¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*т0*▀0*Ёт0*Ёт0*Ёт0*Ёт0*Ёт0*Ёт0*т0*т0*т0*т0*т0*Ёт0*▀▀0*т0*т0*Ё▀0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(<=>?@ABJRZbcdХп░▒▓┬╩╥┌тъЄє5678rПРСТУФХЭчuЁх0*ЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁчuЁх0*Ёх0*Ёх0*ЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁчuЁх0*Ёх0*Ёх0*Ёх0*Ё▀0*Ёх0*ЁтuЁтuЁтuЁтuЁтuЁтuЁтuЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(g УquitФ in place of a string of digits for the first number. Call a function to convert each string separately to groups of digits. Call a function to add the groups of digits. After the addition has been completed, print the two numbers that were added and the result that was produced. For example, the following numbers have been placed in groups of digits for adding. Array A first_groupA 99999997895425587458798752488521467Array B first_groupB 3548987987524532548755642874added together they produce the following result Array C first_groupC  100000001444413574983331301244164341 Before you call the function to add the groups of digits, test to determine which array has the largest number and pass that array as the first group of digits. The algorithm to determine this is given as follows. ALGORITHM if(first_groupA > first_groupB) // arrays may or may not contain the same number of groups of digits add(A, first_groupA, B, first_groupB, C, first_groupC, size) // size is the number of elements in each array (40) else add(B, first_groupB, A, first_groupA, C, first_groupC, size) // B has the most groups or same number of groups as A Write a function to take each string of digits and convert it to groups of integer digits (7 digits per group) stored in a long integer array. Use the function you wrote for Clab 2. Pass to the function each large integer number separately as a character string, the integer array, and assign the subscript of the array element that contains the first group of digits to the last argument. Write a function to add two large integer numbers and store the result in a third array. The algorithm to add these groups is given in a diagram on a separate page. Write a function to print the number stored in one integer array. Print the groups of digits so that there are no blanks between the digits in the long integer values. Use the function you previously wrote to output groups of digits in an array. You will have to modify this function so that you can print a minus sign before the number if the number is negative. Name the file you create, CLAB3. Do Not Use Any Global Variables. Save both the source (cpp file) and object code (exe) on your disk which is turned in at the end of the lab. Examples of Addition Adding large integers stored as groups of digits in an array Groups not same size, result has more groups than largest number Array A first_groupA 9999999999999978Эен╡╢╙╘╒╓╫╪┘сщё∙·√,NOPQRSbjrzВГоп░°¤uЁ¤uЁ¤uЁфuЁт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё▀0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(-5=EMN|}~АБВГДМФХЦ╟щъыьэю№ IJKxХЦЧШ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(ШЩЪЫи░╕└┴▐▀рстуфяў  :WXYZ[\]hpxАБЛМУФ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ё▀0*жт0*Ёт0*K╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*'K@ё Normala "A@Є б"Default Paragraph FontЫ    !  !  ╞ Ы Ы0*0*X \ЭШ #UnknownVamshi SriperumbudurХЬЭбСЭ▄шNZ~КНЩ  !-{ЗМШЭйЩЭn q Й М h t ║ ╞ - 9 Q]╠╪Шд·gs\h╒сЭ░Computer Science Department%C:\My Documents\515 CLab2 fall 01.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.doc @HP LaserJet III\\Csfrontdesk\frontHPPCL5MSHP LaserJet IIIHP LaserJet IIIФ@g,,@MSUDOHP LaserJet IIIАd HP LaserJet IIIФ@g,,@MSUDOHP LaserJet IIIАd А diВЖЛ  ЪЫсс'с@сDрЙсIрЖр1РTimes New Roman РSymbol &РArial"qМ╨hгSiF█ZifгSiF░WГ $╬ДCSCI 515 C/C++ Programming Fall 2001Computer Science DepartmentComputer Science DepartmentЭен╡╢╙╘╒╓╫╪┘сщё∙·√,NOPQRSbjrzВГоп░°¤uЁ¤uЁ¤uЁфuЁт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё▀0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(-5=EMN|}~АБВГДМФХЦ╟щъыьэю№ IJKxХЦЧШ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*(ШЩЪЫи░╕└┴▐▀рстуфяў  :WXYZ[\]hpxАБЛМУФ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ёт0*Ё¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁ¤uЁфuЁт0*Ёт0*Ё▀0*жт0*Ёт0*K╕l╗ ╛ Ф с.{ ╚bп№!I&Ц*'K@ё Normala "A@Є б"Default Paragraph FontЫ    !  !  ╞ Ы{ Ы0*0*Ё0*i \ЭШ #UnknownVamshi SriperumbudurХЬЭбСЭ▄шNZ~КНЩ  !-{ЗМШЭйЩЭn q Й М h t ║ ╞ - 9 Q]╠╪Шд·gs\h╒сЭ▓Computer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department)C:\My Documents\515 CLab3 Spring 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.docComputer Science Department'C:\My Documents\515 CLab3 Fall 2002.doc @HP LaserJet III\\Csfrontdesk\frontHPPCL5MSHP LaserJet IIIHP LaserJet IIIФ@g,,@MSUDOHP LaserJet IIIАd HP LaserJet IIIФ@g,,@MSUDOHP LaserJet IIIАd Аpppp|iВЖЛ{М  ЪЫ11'1@1D0Й1X0К 1I0Ж01РTimes New Roman РSymbol &РArial"qМ╨hгSiF┤[ifгSiF░WГ $╬ДCSCI 515 C/C++ Programming Fall 2001Computer Science DepartmentComputer Science Department