Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

python program to find sum of digits of a number using while loop

#  Write a Program to display sum of all digits of a given
#  Number N by user

n = int(input('Enter a number : '))
sum=0

while(n>0):
    rem = n%10
    sum = sum+rem
    n = n//10
print('reversed no. is : ',int(sum))
Comment

PREVIOUS NEXT
Code Example
Typescript :: how to check if a variable exists in python 
Typescript :: typescript style type 
Typescript :: node redis new objects must be created at the root 
Typescript :: battle cats challenge battle 
Typescript :: google chrome extensions content scripts matches 
Typescript :: typescript add days to date 
Typescript :: adonis load relationship 
Typescript :: Which two import statements will allow for the import of the HashMap class? 
Typescript :: ts playground download 
Typescript :: count objects in selenium java 
Typescript :: serenity-is hide column 
Typescript :: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16 
Typescript :: model has no objects member django 
Typescript :: reset specific field in reactive form 
Typescript :: E_MISSING_NAMED_MIDDLEWARE: Cannot find a middleware named "auth" 
Typescript :: write objects to file cpp 
Typescript :: react-native loading bar 
Typescript :: how to remove digits in string in python? 
Typescript :: union of two sets python syntax 
Typescript :: a href without redirecting 
Typescript :: how to send data between components in react using link 
Typescript :: cast string react 
Typescript :: typescript declare dictionary type 
Typescript :: npx creat redux typescript app 
Typescript :: three dots dropdown menu bootstrap 
Typescript :: Check if a temporary table exists and delete if it exists 
Typescript :: angular send mailto html 
Typescript :: methods defined as testmethod do not support web service callouts 
Typescript :: typescript get object value 
Typescript :: google reference static 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =