浮動

浮點型別。具有 C++中三種浮點型別中最窄的範圍。

float area(float radius) {
    const float pi = 3.14159f;
    return pi*radius*radius;
}