C SHARPE

PART-A

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6

PART-B

PROGRAM B1 PROGRAM B2 PROGRAM B3 PROGRAM B4 PROGRAM B5 PROGRAM B6 PROGRAM B7 PROGRAM B8 . . .

1.Develop a C# .NET console application to demonstrate the conditional statement

 
     
 
 // 1.Develop a C# .NET console application to demonstrate the conditional statements
 
using System;
using System.IO;
using System.Text;

namespace IncludeHelp
{
    class Test
    {
        // Main Method 
        static void Main(string[] args)
        {
            //finding largest of two numbers 
            int a;
            int b;

            //input numbers 
            Console.Write("Enter first number : ");
            a = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter second number: ");
            b = Convert.ToInt32(Console.ReadLine());

            //finding largest number
            int large = (a > b) ? a : b;

            Console.WriteLine("Largest number is {0}", large);


            //hit ENTER to exit the program
            Console.ReadLine();
        }
    }
}