Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

int sum.

num = int(input("Enter a positive integer: "))
temp = num
sum=0
while temp>0:
    digit = temp%10
    sum=sum+digit
    temp= int(temp/10)
print("Sum of digits of",num,"is",sum)
Comment

PREVIOUS NEXT
Code Example
Typescript :: react components for login 
Typescript :: uat testing vs system testing 
Typescript :: Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. 
Typescript :: typescript module 
Typescript :: ts object field from variable 
Typescript :: kotlin get first n elements from list 
Typescript :: typescript readonly 
Typescript :: software for checking open ports of IP 
Typescript :: generic typescript 
Typescript :: typeorm transaction example 
Typescript :: Scroll, Position 
Typescript :: ERROR in The Angular Compiler requires TypeScript =3.4.0 and <3.6.0 but 4.1.5 was found instead. 
Typescript :: Comparison method violates its general contract! 
Typescript :: disable srr svelteKit 
Typescript :: Roblox Script wait 
Typescript :: highcharts turbothreshold not working 
Typescript :: three requirements for laser action 
Typescript :: how to compare two entity objects in c# to update 
Typescript :: file attachements contac form 7 
Typescript :: get required schema fields name into array mongoose typescript 
Typescript :: how to find the total of the products added to the shopping cart in java program 
Typescript :: pptxgenjs table 
Typescript :: angular JSON.parse (<anonymous) 
Typescript :: typescript not supporting scss 
Typescript :: my controller is not recognized and it actually exists why is this happening 
Typescript :: how to get values from api and iterate through array in typescript and angular 
Typescript :: Event Handing With Vue 
Typescript :: webintent plugin cordova 
Typescript :: how to make a tool detect a click and add points roblox studio 
Typescript :: Write a prolog program to find the sum of elements in given list. 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =