Well, you do have to put that line AFTER the variable gx has been assigned a value.
What do you really want to do? If you just need the integer value of gx, ignore the numbers that come after the decimal point when you print it. Or change the print statement to:
I need that int value to make a bit shifting to another software called bridge control panel (bcp). So that bcp can receive the arduino sketch that i did and display a graph while im moving the gyro inside the arduino board. Currently the sketch that i did can only display on serial monitor in arduino when i move the board.