fork download
  1. import std.stdio;
  2.  
  3. void main()
  4. {
  5. int number;
  6.  
  7. while (number >= 0) {
  8. write("Please enter a number: ");
  9. readf(" %s", &number);
  10.  
  11. writeln("Thank you for ", number);
  12. }
  13.  
  14. writeln("Exited the loop");
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(9): Error: undefined identifier readf
prog.d(9): Error: function expected before (), not readf of type int
stdout
Standard output is empty