Ejemplo n.º 1
0
    public static string p00_title(int problem)

    //****************************************************************************80
    //
    //  Purpose:
    //
    //    P00_TITLE returns the title for any problem.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    02 February 2010
    //
    //  Author:
    //
    //    John Burkardt
    //
    //  Parameters:
    //
    //    Input, int PROBLEM, the index of the problem.
    //
    //    Output, string P00_TITLE, the title of the problem.
    //
    {
        string title;

        switch (problem)
        {
        case 1:
            title = Problem01.p01_title();
            break;

        case 2:
            title = Problem02.p02_title();
            break;

        case 3:
            title = Problem03.p03_title();
            break;

        case 4:
            title = Problem04.p04_title();
            break;

        case 5:
            title = Problem05.p05_title();
            break;

        case 6:
            title = Problem06.p06_title();
            break;

        case 7:
            title = Problem07.p07_title();
            break;

        case 8:
            title = Problem08.p08_title();
            break;

        default:
            Console.WriteLine("");
            Console.WriteLine("P00_TITLE - Fatal error!");
            Console.WriteLine("  Illegal problem number = " + problem + "");
            return("");
        }

        return(title);
    }