Hello i'm kinda new to D language and i wanted to make a simple program but somehow my input does no go to my if statements and just continues to ask for the user to input.Kindly help me

btw here is my sample code

    int func;
writeln("\t\tEnter Selection : ");
    func = readln;
    writeln(func);

    if(func == 1)
    {
        writeln("hello world");
    }
    if(func == 2)
    {
        writeln("hello world");
    }
    if(func == 3)
    {
        writeln("endtime");
    }
    if(func == 4)
    {
        writeln("hello world");
    }
    if(func == 5)
    {
        writeln("hello world");
    }

Reply via email to