Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

missing number

numbers = input("Enter your numbers with ','separated form : ")
int_array = list(map(int,numbers.split(",")))
Sum = 0
for i in range(len(int_array)):
    Sum = Sum+int_array[i]
n = len(int_array) +1
missing = (((n+1) * (n))/2) -Sum 
print(missing)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #missing #number
ADD COMMENT
Topic
Name
9+8 =