Unary operator overloading

Description:

Write a program to demonstrate unary operator overloading Test Case 1 Input (stdin) 5 5 5 Expected Output -5 -5 -5 Test Case 2 Input (stdin) 2 5 8 Expected Output -2 -5 -8

Program :


#include <iostream>

using namespace std;

int main()

{

int a,b,c;

  cin>>a>>b>>c;

  cout<<"-"<<a<<" -"<<b<<" -"<<c;

return 0;

}