CodeSolved

A comprehensive source of programming questions and exercises

Integers between 2 pcs

Practice Easy 26/ Download 1777 Views

Write a program that prints an integers in the output.

Get the desired interval from the input.

15 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
x = int(input('x :'))
y = int(input('y :'))
for i in range(x , y):
    print(i)
Akams Download Python
a = int(input("add1:  "))
b = int(input("add2:  "))
if (a == b) or (b == a + 1) or (a == b - 1):
    print (" adadi beneshan nist")
elif   a > b:
    x = b + 1
    while x < a :
        print(x)
        x += 1
else:
    j = a +1
    while j < b :
        print(j)
        j += 1
User 3026 Download Python
while True:
    a = int(input("adade aghaz bazeh ra vared kon: "))
    b = int(input("adade payane bazeh ra vared kon: "))
    if a<b:
        break
    print(f"{b} bozorg tar az {a} nist")
    print("adadi aghaz bayad az payan kochak tar bashad")

print("adad haye zir haseli az adad haye sahihe bazeyi hastand ko shoma vared nemoodin ")

for i in range(a,b):
    if i % 1 == 0:# If I didn't make the condition, it will not be the case
        print(i)
Azhgun Download Python
a=int(input("adad aval:"))
b=int(input("adad dovom:"))
for i in range(a,b)
    print(i)
User 61 Download Python
def print_integer_range(start, end):
    # Printing integers within the specified range
    for number in range(start, end + 1):
        print(number)

# Receive the interval from the user.
try:
    start = int(input("لطفاً حد پایین بازه را وارد کنید: "))
    end = int(input("لطفاً حد بالا بازه را وارد کنید: "))

    if start > end:
        print("حد پایین باید کمتر یا برابر با حد بالا باشد.")
    else:
        print(f"اعداد صحیح در بازه [{start}, {end}]:")
        print_integer_range(start, end)

except ValueError:
    print("لطفاً فقط اعداد صحیح وارد کنید.")
a=int(input("enter : "))b=int(input("enter : "))c=b+1for i in range(a,c):    print(i)
Lakbig Download Python
print("Please make sure that you enter a natural number!")
print("And also make sure that the first number is smaller!")
number1=int(input("please enter a number here:"))
number2=int(input("please enter another number here:"))
for z in range (number1,number2):
    print(z)
Chef.nasim Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close