The problem with your numbers (the constants 22 and 7). The compiler interprets them as integers and therefore performs an integer division (it means that the result an integer too)...
So actually 22/7 is compiled to (int)((int)22 / (int)7), that results in 3...
You have free ways to overcome it...
1. Add one place after the decimal point (a ) of course to keep the value) - 22 => 22.0. This will force the compiler to interpret the number as double...
2. Add a suffix too to create a float - 22 => 22.0f...
3. Store values in variables an use them in division -
float f22 = 22;
float f7 = 7;
float x = f22 / f7;