Sunday, 1 September 2013

library info ( small program )

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace libraryInfo
{
    class Program
    {
       static void Main(string[] args)
       {
           int choice;
           swat:
           Console.WriteLine("1.Computer Books");
           Console.WriteLine("2.Mathmetical Books");
           Console.WriteLine("3.History Books");
           Console.WriteLine("4.English");
           choice = Int32.Parse(Console.ReadLine());
          
           switch (choice)
           {
               case 1:
                   Console.WriteLine("1.Introducing Windows Server 2012");
                   Console.WriteLine("2.Let Us C");
                   Console.WriteLine("3.Database Fundamentals");
                   Console.WriteLine("4.C# in Depth ");
                   break;
               case 2:
                   Console.WriteLine("1.Abstract Algebra");
                   Console.WriteLine("2.Complex Analysis");
                   Console.WriteLine("3.Applied Mathematics");
                   Console.WriteLine("4.Calculus");
                  

                   break;
               case 3:
                   Console.WriteLine("1.The Origin of Species ");
                   Console.WriteLine("2.The Koran ");
                   Console.WriteLine("3.The Communist Manifesto ");
                   Console.WriteLine("4.The Republic ");
                   Console.WriteLine("5.The Complete Works ");
                   break;
               case 4:
                   Console.WriteLine("1.An Enchanted Evening");
                   Console.WriteLine("2.Battle of Midway");
                   Console.WriteLine("3.Endangered Species");
                   Console.WriteLine("4.Part of their World");
                   break;
               default:
                   Console.WriteLine("Try again");
                   goto swat;   
                   break;
           
           
           
           }
       }
    }
}

No comments:

Post a Comment