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

asked
User Poni
by
7.3k 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.

answered
User Smammy
by
7.7k points
2 votes

Answer:

Step-by-step explanation:

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

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

answered
User Mdcq
by
8.5k points

No related questions found