| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 128820 | 王晏林 | 11计算分段函数的值 | C++ | Compile Error | 0 MS | 0 KB | 266 | 2025-08-20 11:12:07 |
#include<iostream> using namespace std; int main(){ float n; cin>>n; if(n>=0&&n<5){ printf("%.3f",-n+2.5); } else if(n<=5&&n<10){ printf("%.3f",2-1.5*(n-3)*2); } else (n<=10&&n<20){ printf("%.3f",n/2-1.5); } return 0; }
Main.cc: In function 'int main()':
Main.cc:12:20: error: expected ';' before '{' token
else (n<=10&&n<20){
^