module pind.samples.ja.while_.while_5; import std.stdio; void main() { /* 論理式は常に真であるため、無条件ループ * */ while (true) { write("0:Exit, 1:Turkish, 2:English - Your choice? "); int choice; readf(" %s", &choice); if (choice == 0) { writeln("See you later..."); break; // このループの唯一の終了条件 } else if (choice == 1) { writeln("Merhaba!"); } else if (choice == 2) { writeln("Hello!"); } else { writeln("Sorry, I don't know that language. :/"); } } }