← dlang

externary1.d

55df301eb445d261f1c8ebc57806a721764b7d35 · ovidiucs · Sep 7, 2015 13:06

+2 −2 · 1 file changed

  • externary1.d +2 −2
diff --git a/externary1.d b/externary1.d
index e8855e7..3260fcb 100644
--- a/externary1.d
+++ b/externary1.d
@@ -1,11 +1,11 @@
 import std.stdio;
 import std.conv;
+import std.string;
 
 void main()
 {
-   int value;
    write("Enter ammount negative or positive: ");
-   readln(&value);
+   auto value = chomp(readln());
    writeln(value < 0 ? "$",to!string(value)," lost" : "$",
          to!string(value)," gained");
 }