Defining Macros
7E2600· international gm3s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
1#define sum x + y1 * sum
Output
Suspicious
Sample 2of 4
Input
1#define sum (x + y)sum - sum
Output
OK
Sample 3of 4
Input
4#define sum x + y#define mul a * b#define div a / b#define expr sum + mul * div * mulexpr
Output
OK
Sample 4of 4
Input
3#define SumSafe (a+b)#define DivUnsafe a/b#define DenominatorUnsafe a*b((SumSafe) + DivUnsafe/DivUnsafe + x/DenominatorUnsafe)
Output
Suspicious
58%
7E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)