Run id: 135368
Main.cc:2:1: error: 'usingnamespacestd' does not name a type
usingnamespacestd;
^
Main.cc:4:9: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive]
intmain() {
^
Main.cc: In function 'int intmain()':
Main.cc:5:5: error: 'intb' was not declared in this scope
intb = 7; // 小A手中的金额
^
Main.cc:6:5: error: 'inta' was not declared in this scope
inta = 1; // 单价
^
Main.cc:8:5: error: 'intn' was not declared in this scope
intn = b / a; // 基础购买数量
^
Main.cc:8:12: error: 'b' was not declared in this scope
intn = b / a; // 基础购买数量
^
Main.cc:8:16: error: 'a' was not declared in this scope
intn = b / a; // 基础购买数量
^
Main.cc:9:5: error: 'intbonus' was not declared in this scope
intbonus = (n / 3); // 优惠赠送数量
^
Main.cc:9:17: error: 'n' was not declared in this scope
intbonus = (n / 3); // 优惠赠送数量
^
Main.cc:10:5: error: 'cout' was not declared in this scope
cout << n + bonus; // 输出总鸡腿数量
^
Main.cc:10:5: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
Main.cc:10:17: error: 'bonus' was not declared in this scope
cout << n + bonus; // 输出总鸡腿数量
^
Main.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^