为什么我这在Dev c++正常运行,在这就编译失败
查看原帖
为什么我这在Dev c++正常运行,在这就编译失败
1305223
caik66楼主2024/10/11 11:39
#include <iostream>  
#include <cmath>
 
using namespace std;
int main() {
    int T;
    cin >> T;
    if (T == 1) {
        cout << "I love Luogu!";
    } else if (T == 2) {
        cout << 2 + 4 << " " << 10 - 2 - 4;
    } else if (T == 3) {
        cout << 3 << " " << 12 << " " << 2;
    } else if (T == 4) {
        float ml;
        ml = 500 / 3.0f; 
        printf("%.6f\n", ml); 
    } else if (T == 5) {
        cout << 15;
    } else if (T == 6) {
        cout << pow(36+81,1/2);
    } else if (T == 7) {
        cout << 110 << endl;
        cout << 90 << endl;
        cout << 0 << endl;
    } else if (T == 8) {
        int r = 5;
        double pi = 3.141593;
        cout << 2 * pi * r << endl; 
        cout << pi * r * r << endl; 
        cout << 4/3.0 * pi * r * r << endl; 
    } else if (T == 9) {
        int pee = 1;
        pee = (pee + 1) * 2;
        pee = (pee + 1) * 2;
        pee = (pee + 1) * 2;
        cout << pee;
    } else if (T == 10) {
        cout << 9;
    } else if (T == 11) {
        cout << 100.0/3;
    } else if (T == 12) {
        cout << 13 << endl;
        cout << "R";
    } else if (T == 13) {
        float pi = 3.141593;
        float V = 4/3 * pi * 14 * 14 * 14;
        int a = static_cast<int>(pow(V,1/3)); 
        cout << a;
    } else if (T == 14) {
        cout << 50;
    }
    return 0;
}
2024/10/11 11:39
加载中...