Mzsmunna
10/16/2019 - 1:46 PM

1st LAB of C# 2


class Program
{
    public static void Main(string[] args)
    {
        string name, id, cgpa, dept;

        //name = System.Console.Read().ToString();
        System.Console.Write("Enter Your Name : \n");
        name = System.Console.ReadLine();
        System.Console.Write("Enter Your ID : \n");
        id = System.Console.ReadLine();
        System.Console.Write("Enter Your cgpa : \n");
        cgpa = System.Console.ReadLine();
        System.Console.Write("Enter Your Department : \n");
        dept = System.Console.ReadLine();

        System.Console.Write("Hello World !!!\nName: Mzs Munna\nID: 15-29817-2\nDepartment: CSSE\nCGPA: 3.40\n\n");
        
        System.Console.WriteLine("Name: "+name);
        System.Console.WriteLine("ID: "+id);
        System.Console.WriteLine("Department: "+dept);
        System.Console.WriteLine("CGPA: "+cgpa);

        System.Console.WriteLine("\nName: {0}\nID: {1}\nDepartment: {2}\nCGPA: {3}",name,id,dept,cgpa);
        //System.Console.ReadKey();
    }
}