Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109937 范恒恺 09优惠活动 C++ Compile Error 0 MS 0 KB 267 2025-02-13 14:46:46

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char 'w'; int a;//定义商品价格 double b; cin>>b>>a; if(w=='P'){ cout<<a/0.7; } if(w=='G'){ cout<<a/0.8; } if(w=='S'){ cout<<a/0.9; } if(w==b){ cout<<a*1.0/0.95; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:6: error: expected unqualified-id before 'w'
 char 'w';
      ^
Main.cc:8:4: error: 'w' was not declared in this scope
 if(w=='P'){
    ^
Main.cc:11:4: error: 'w' was not declared in this scope
 if(w=='G'){
    ^
Main.cc:14:4: error: 'w' was not declared in this scope
 if(w=='S'){
    ^
Main.cc:17:4: error: 'w' was not declared in this scope
 if(w==b){
    ^