cf/mirror

Defining Macros

CF
7E2600· international gm3s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
1
#define sum x + y
1 * 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 * mul
expr
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
7E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)