its sick its bloated from being sick then makes it swim upside down the tank is prally very dirty also, add some fresh water to it try to make it a correct tempature, clean the tank out, most the time it will prally die, but also a small chance it may fart its way back to normal
Sounds like a swim bladder disorder or dropsy. You need to isolate your fish in another bowl or tank and start it on some sort of antibacterial medicine. Also test the water quality of your tank. Hopefully he'll make it!
It's called bloat or dropsy...he prob ate too much and will most likely die soon if you don't quarantine the fish..there are drops you could get to treat it..Good luck..I worked in a pet store for a year and a half by the way!!