Q. Write a program to input a single digit and print a three digit number created as < n (n+1) (n+2)>.

e.g., if you input 7 then it should print 789. Assume that the input digit is range 1-7.


You can understand by Watching video :-



Answer :-

a = int (input ('Enter the number 1=< and >=7 :  '))
print ("number is = ", a,a+1,a+2)

Output :-

Enter the number 1=< and >=7 :  7
number is =  7 8 9

>>> 

Enter the number 1=< and >=7 :  5
number is =  5 6 7

>>>

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post