Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
4991 刘轩宁 09优惠活动 C++ Compile Error 0 MS 0 KB 261 2024-10-19 20:54:04

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; switch(a){ case P: cout<<b*0.7; break; case G: cout<<b*0.8; break; case S: cout<<B*0.9; break; default:cout<<b*0.95; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:8: error: 'P' was not declared in this scope
   case P:
        ^
Main.cc:10:11: error: 'G' was not declared in this scope
      case G:
           ^
Main.cc:13:8: error: 'S' was not declared in this scope
   case S:
        ^
Main.cc:14:10: error: 'B' was not declared in this scope
    cout<B*0.9;
          ^