Variables and Data types

 using System;

using System.IO;

using System.Linq;

using System.Collections.Generic;


namespace CSharp_Shell

{


 public class Program

 {

  public static void Main()

  {

   /*

   //Your Information

   string name, city;

   int age, pin;

   //

   Console.Write("Enter Your Name : ");

   name = Console.ReadLine();

   Console.Write("Enter your City : ");

   city = Console.ReadLine();

   Console.Write("Enter your age : ");

   age = Convert.ToInt16(Console.ReadLine());

   Console.Write("Enter your Pin Number : ");

   pin = Convert.ToInt16(Console.ReadLine());

   //

   Console.WriteLine("\n================");

   Console.WriteLine("Your Information");

   Console.WriteLine("================");

   Console.WriteLine("Name : {0}\nCity : {1}", name, city);

   Console.WriteLine("Age : {0}\nPin : {1}", age, pin);

   //

   //

   //

   //

   /*

   //Your Mailing address

   string name, city, street;

   int pin, houseNo;

   //

   Console.Write("Enter Your Name : ");

   name = Console.ReadLine();

   Console.Write("Enter your City : ");

   city = Console.ReadLine();

   Console.Write("Enter your street : ");

   street = Console.ReadLine();

   Console.Write("Enter your Pin Number : ");

   pin = Convert.ToInt16(Console.ReadLine());

   Console.Write("Enter your House No : ");

   houseNo = Convert.ToInt16(Console.ReadLine());

   //

   Console.WriteLine("\n============");

   Console.WriteLine("Your Address");

   Console.WriteLine("============");

   Console.WriteLine("Name : {0}\nCity : {1}", name, city);

   Console.WriteLine("Street : {0}\nPin : {1}", street, pin);

   Console.WriteLine("House No : {0}", houseNo);

   */

   //

   //

   //

   /*

   //Student Information

   string studentName, universityName;

   int rollNo, age, Class;

   //

   Console.Write("Enter Student Name : ");

   studentName = Console.ReadLine();

   Console.Write("Enter RollNo : ");

   rollNo = Convert.ToInt32(Console.ReadLine());

   Console.Write("Enter age : ");

   age = Convert.ToInt16(Console.ReadLine());

   Console.Write("Enter Class : ");

   Class = Convert.ToInt16(Console.ReadLine());

   Console.Write("Enter SchoolName : ");

   universityName = Console.ReadLine();

   //

   Console.WriteLine("\n===================");

   Console.WriteLine("Student Information");

   Console.WriteLine("===================");

   Console.WriteLine("Student Name : {0}\nRollNo : {1}\nAge : {2}\nClass : {3}\nUnviversityName : {4}"

   , studentName, rollNo, age, Class, universityName);

   */

  }

 }

}

Comments

Popular Posts