Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me out with creating this program. Instructions are in the image bel

ID: 3669774 • Letter: P

Question

Please help me out with creating this program. Instructions are in the image below. It must be in C++ syntax and PLEASE DO NOT paste a previously an already existing full solution or code that is online. I would really apprecaite an original new one or at least some of it new. Please type it or if you write it on paper or on board, make sure it is clear to read. And please test / build/ debug it in a compiler to see if it works.

Excercise11 Chapter 8

4. Programming Exercise 11 in Chapter 8 explains how to add large integers using arrays. However, in that exercise, the program could add only integers of, at most, 20 digits. This chapter explains how to work with dynamic integers. Design a class named largelntegers such that an object of this class can store an integer of any number of digits. Add operations to add, subtract, multiply, and compare integers stored in two objects. Also add constructors to properly initialize objects and functions to set, retrieve, and print the values of objects

Explanation / Answer

Hi, Please find my own code that is very simple and easy:

#include<iostream>
using namespace std;
int main() {
int num1[255], num2[255], sum[255];
char s1[255], s2[255];
int l1, l2;


cout<<"Enter Number1:";
cin>>s1;
cout<<"Enter Number2:";
cin>>s2;

/* convert character to integer*/

for (l1 = 0; s1[l1] != ''; l1++)
num1[l1] = s1[l1] - '0';

for (l2 = 0; s2[l2] != ''; l2++)
num2[l2] = s2[l2] - '0';

int carry = 0;
int k = 0;
int i = l1 - 1;
int j = l2 - 1;
for (; i >= 0 && j >= 0; i--, j--, k++) {
sum[k] = (num1[i] + num2[j] + carry) % 10;
carry = (num1[i] + num2[j] + carry) / 10;
}
if (l1 > l2) {

while (i >= 0) {
sum[k++] = (num1[i] + carry) % 10;
carry = (num1[i--] + carry) / 10;
}

} else if (l1 < l2) {
while (j >= 0) {
sum[k++] = (num2[j] + carry) % 10;
carry = (num2[j--] + carry) / 10;
}
} else {
if (carry > 0)
sum[k++] = carry;
}


cout<<"Resulr:"<<endl;
for (k--; k >= 0; k--)
cout<<sum[k];

return 0;
}