Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
Program Environment Solutions
Program Environment Dersi Problem Çözümleri
-
import std.stdio; import std.conv; int main(string[] args) { if (args.length != 4) { stderr.writeln( "ERROR! Usage: \n ", args[0], " a_number operator another_number"); return 1; } immutable first = to!double(args[1]); string op = args[2]; immutable second = to!double(args[3]); switch (op) { case "+": writeln(first + second); break; case "-": writeln(first - second); break; case "x": writeln(first * second); break; case "/": writeln(first / second); break; default: throw new Exception("Invalid operator: " ~ op); } return 0; }
-
import std.stdio; import std.process; void main() { write("Please enter the command line to execute: "); string commandLine = readln(); writeln("The output: ", executeShell(commandLine)); }
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Sun Aug 24 07:18:00 2025