module main;
import std.stdio;
import std.string;
int main(string[] args)
{
int resp;
char[] p, q;
writefln("MENU DE OPCIONES");
writefln("1) Modus Ponens");
writefln("2) Modus Tollens");
writefln("3) Silogismo Hipotetico");
writefln("4) Salir");
do{
writeln("Introduce la opcion que deseas: ");
readf(" %d", &resp);
}while(resp<1 || resp>4);
write("Write p:");
readln(p); // This is skipped. ¿?
p = chomp(p);
write("Write q:");
readln(q);
q = chomp(q);
writeln("p: ",p); // Doesn't write anything.
writeln("q: ",q); // Writes what you typed in the keyboard
back on readln();
return 0;
}
This is the entire code.
Environment:
Windows 7 Home Premium x64
IDE: CodeBlocks 13.12
Compiler: Digital Mars D Compiler