I have a variable and I want to find the sum of the digits. How do I do that?
I.e. I have
n = 273
And I want to find the sum: 2+7+3 = 12
I have a variable and I want to find the sum of the digits. How do I do that?
I.e. I have
n = 273
And I want to find the sum: 2+7+3 = 12
:: Copyright KIRUPA 2024 //--