Write a program that preform postfix , prefix increment and decrement on a number
///////// solutions
#include <iostream>
using namespace std;
int main() {
int num=10;
cout<<"After the prefix increment"<<++num<<endl;
cout<<"Aftr the postfix increment"<<num++<<endl;
cout<<"After the prefix decrement"<<--num<<endl;
cout<<"Aftr the postfix decrement"<<num--<<endl;
}
No comments:
Post a Comment