Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 689 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 689 Bytes

Sum Limit Instructions

Given 2 non-negative ints, a and b, print their sum,
so long as the sum has the same number of digits as a.
If the sum has more digits than a, just return a without b.

Provided 2 solutions and used Solution 1 becasue it is more efficient. Tested both solutions and they work. 

Example Test Out Put
• inputof(2,3) -> 5
• inputof(8,3) -> 8
• inputof(8,1) -> 9

Tested the code in the terminal using the commands 
g++ main.cpp 
./a.out 
to test against the a.out

Screen Shot of the Test Output

fileSum_Limit