The class Flags is already defined with a private 8-bit variable bits, a constructor, and a getter.
Your task is to overload the bitwise NOT (~) operator so that applying ~flags returns a new Flags object with all 8 bits inverted.
In main():
Flags object using the lower 8 bits of the input~ operator
Input / Output Specification
Input:
A single integer N such that 0 ≤ N ≤ 255
Output:
Print the original input and the inverted value in the format:
Input=<input_value> Toggled Input=<toggled_value>
Example 1
Input:
0Output:
Input=0 Toggled Input=255
Example 2
Input:
255Output:
Input=255 Toggled Input=0
Example 3
Input:
170Output:
Input=170 Toggled Input=85
Constraints
Expected Output
Input=0 Toggled Input=255