Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146942 张晓冉 09优惠活动 C++ Compile Error 0 MS 0 KB 452 2026-02-01 12:40:04

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char a; cin>>a; int x; cin>>x; if(a == 'P'){ x = x/10*7 cout<<fixed<<setprecision(2)<<x; }else if(a == 'G'){ x = x/10*8; cout<<fixed<<setprecision(2)<<x; }else if(a == 'S'){ x = x/10*9; cout<<fixed<<setprecision(2)<<x; }else{ x = x/10*9.5; cout<<fixed<<setprecision(2)<<x; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:9: error: expected ';' before 'cout'
         cout<