4 תשובות
איזה שפה?
שואל השאלה:
פייתון
פייתון
#input an integer
num = int(input("enter an integer: "))
#count the number of digits in the integer
count = 0
#loop until the number is greater than 0
while (num > 0):
num = num // 10
count += 1
#print the number of digits
print("the number of digits in the integer is",count)
num = int(input("enter an integer: "))
#count the number of digits in the integer
count = 0
#loop until the number is greater than 0
while (num > 0):
num = num // 10
count += 1
#print the number of digits
print("the number of digits in the integer is",count)
שואל השאלה:
תודהה
תודהה
באותו הנושא: