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

Start with the followingprogram skeleton and write a C (or C++) program to add t

ID: 3613514 • Letter: S

Question

Start with the followingprogram skeleton and write a C (or C++) program to add

two numbers each upto 255decimals. Accept the two numbers from keyboard using

scanf or gets functions anddisplay the result using printf commands or commands

providing similar functions Inthe main function there should be code for only

1- Accept the two numbersequences from keyboard

2- Print the resulting sum

3- Function calls to utilityfunctions

The numbers will have to beaccepted as strings and printed as a string because an

integer or a long variable inthe 32 bit Intel architecture is 32 bits and can only hold a

number upto 4.29 * 109 (clearly a number less than 10 digits). Please remember that

an integer variable or a doublecan not hold numbers up to 255 decimals.

Your (program including themain) should not have a single code segment larger than

20 lines. If a code segment islarger than 20 lines than the code segment should be

divided by use of functions.The following functions are examples of suggested

functions but not a completelist.

   A function toaccept the variables from keyboard

A function to displaythe result

A function to add twonumbers stored in strings in unpacked BCD format

A function to convert anumber stored as a ASCII string into unpacked BCD

format

A function to convert astring containing unpacked BCD numbers into ASCII

format

Explanation / Answer

please rate - thanks I'm giving you an outline and messaging you the entireprogram. Don't look at the message unless needed. message meif needed #include using namespace std; void input(char[]); int add(char[],char[],char[]); void print(char[],int,int); int finish(char[],int,char[],int,int,int); int main() {char num1[256],num2[256],sum[257]; int i,digits; for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote