Skip to content

sonu874/summation.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

summation.py

def summation(l,p,s): m=[];i=0

while i<len(l): m=l[i:p] if sum(m==s): print(m) i=i+1 p+=1 else: i=i+1 p=p+1

#main l=[] n=int(input("enter length of array:")) for i in range(n): x=int(input("enter a value:")) l.append(x) s=int(input("enter a given sum:")) for p in range(n): x=summation(l,p,s)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published