. Write a Python program to input a number and print its value after adding 5 and after
reducing 5
Answers
Answered by
2
Required Answer:-
Question:
- Write a Python program to input a number and print it's value after adding 5 and after reducing 5.
Solution:
Here comes the program.
n=int(input("Enter a number: "))
print("After adding 5, number =",n+5)
print("After subtracting 5, number =",n-5)
Algorithm:
- START
- Accept the number.
- Add 5 to the number and display it.
- Subtract 5 from the number and display it.
- STOP
For verification, check out the attachment ☑.
Attachments:
Similar questions