Answers for "in java write a code that suppose the following input is supplied to the program: 9 Then, the output should be: 12096 (99+999+9999+999)"

0

in java write a code that suppose the following input is supplied to the program: 9 Then, the output should be: 12096 (99+999+9999+999)

def mySum(k, n):
    return n * sum([ n1 * n2 for n1, n2 in zip(
        [ i + 1 for i in range(k) ],
        [ 10 ** (k - i - 1) for i in range(k) ])])
Posted by: Guest on December-06-2020

Code answers related to "in java write a code that suppose the following input is supplied to the program: 9 Then, the output should be: 12096 (99+999+9999+999)"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language