142k views
0 votes
Ask the user to input an integer. Print out the next three consecutive numbers. in python

User Poni
by
4.7k points

2 Answers

7 votes

Answer:

In python, the code would be written as...

Step-by-step explanation:

n = int(input("Enter Number : "))

print(n+1,n+2,n+3)

You are printing both the number and the next three consecutive numbers after that. which essentially your answer "n" plus the numbers that create the next number "n+1" = your answer plus 1, "n+2" = your answer plus 2, etc.

User Smammy
by
4.9k points
2 votes

Answer:

Step-by-step explanation:

n = int(input("Enter Number : "))

print(n+1,n+2,n+3)

User Mdcq
by
5.4k points