2. Write a program in C++ to display the operation of pre and post increment and decrement. Sample Output: Display the operation of pre and post increment and decrement : The number is : 57 After post increment by 1 the number is : 58 After pre increment by I the number is : 59 After increasing by I the number is : 60 After post decrement by 1 the number is : 59 After pre decrement by 1 the number is : 58 After decreasing by I the number is : 57

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section9.5: Input Data Validation
Problem 1E
icon
Related questions
Question
in c++
2. Write a program in C++ to display the operation of pre and post increment and
decrement.
Sample Output:
Display the operation of pre and post increment and decrement :
The number is : 57
After post increment by 1 the number is : 58
After pre increment by 1 the number is : 59
After increasing by 1 the number is : 60
After post decrement by 1 the number is : 59
After pre decrement by 1 the number is : 58
After decreasing by 1 the number is : 57
Transcribed Image Text:2. Write a program in C++ to display the operation of pre and post increment and decrement. Sample Output: Display the operation of pre and post increment and decrement : The number is : 57 After post increment by 1 the number is : 58 After pre increment by 1 the number is : 59 After increasing by 1 the number is : 60 After post decrement by 1 the number is : 59 After pre decrement by 1 the number is : 58 After decreasing by 1 the number is : 57
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr