SP15453 KCARRY - Yet Another Electronic Device!!!
Description
Fascinated as he is by the uncanny world of electronics, our friend MKS now decides to launch his own creation --> A N-Digit Carry Finder(an analogue of a N-Bit Binary Adder) which can be used to find the number of times we can have a non-zero carry while adding two numbers(A=A $ _{n} $ A $ _{n-1} $ ...A $ _{2} $ A $ _{1} $ and B=B $ _{n} $ B $ _{n-1} $ ...B $ _{2} $ B $ _{1} $ ) having **exactly N** digits.
It consists of 'N' Full Decimal Adders. The i-th Full Adder takes as input three digits A $ _{i} $ ,B $ _{i} $ and C $ _{i-1} $ and outputs a digit C $ _{i} $ (0 or 1), which is the carry generated on adding the digits A $ _{i} $ and B $ _{i} $ and C $ _{i-1} $ .(C $ _{i} $ =1 if A $ _{i} $ +B $ _{i} $ +C $ _{i-1 } $ >9, otherwise 0).
This C $ _{i} $ is now provided to the next (i+1-th) Full Adder in order to be added with the digits A $ _{i+1} $ and B $ _{i+1} $ and also to the accumulator which as the name suggests accumulates the sum of all C $ _{j} $ (1
Input Format
N/A
Output Format
N/A