AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
3. Our Experts are looking for yours ?.

# programming-basics: Program to find the reversed Sum

 Reversed number is a number written in arabic numerals but the order of digits is reversed. The first digit becomes last and vice versa. Note that all the leading zeros are omitted. That means if the number ends with a zero, the zero is lost by reversing (e.g. 1200 gives 21). Also note that the reversed number never has any trailing zeros. Your task is to add two reversed numbers and output their reversed sum. Input Explanation: The input consists of N cases (equal to about 10000). The first line of the input contains only positive integer N. Then follow the cases. Each case consists of exactly one line with two positive integers separated by space. These are the reversed numbers you are to add. Output Explanation: For each case, print exactly one line containing only one integer - the reversed sum of two reversed numbers. Omit any leading zeros in the output. Sample Input: 3 24 1 4358 754 305 794 Sample Output: 34 1998 1 Explanation: For the first sample input, 3 refers to the number of tests. In the first test 24 and 1 are the two numbers ,the reverse of 24 is 42 and for 1 it is 1. Hence the sum of 42 and 1 is 43. The reverse of 43 is 34. programming x 168basics x 171 Posted On : 2017-11-27 16:57:21.0 Divesh 101180 5