CDE
This commit is contained in:
parent
518da4a923
commit
764da6cbbb
6144 changed files with 83610 additions and 11 deletions
13
Task/Arithmetic-Integer/D/arithmetic-integer-2.d
Normal file
13
Task/Arithmetic-Integer/D/arithmetic-integer-2.d
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import std.stdio, std.string, std.conv, std.typetuple;
|
||||
|
||||
void main() {
|
||||
int a = -16, b = 5;
|
||||
try {
|
||||
a = readln().strip().to!int();
|
||||
b = readln().strip().to!int();
|
||||
} catch (StdioException e) {}
|
||||
writeln("a = ", a, ", b = ", b);
|
||||
|
||||
foreach (op; TypeTuple!("+", "-", "*", "/", "%", "^^"))
|
||||
mixin(`writeln("a ` ~ op ~ ` b = ", a` ~ op ~ `b);`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue