Print Employee Data take input from user in c# program.
Employee Data:
output:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace employee_data
{
class Program
{
static void Main(string[] args)
{
string name;
Console.WriteLine("Enter your name");
name= Console.ReadLine();
string fname;
Console.WriteLine("Enter your Father Name");
fname= Console.ReadLine();
string pno;
Console.WriteLine("Enter your phone no");
pno = Console.ReadLine();
string designation;
Console.WriteLine("your designation");
designation= Console.ReadLine();
string datejoin;
Console.WriteLine("Enter date of hiring");
datejoin= Console.ReadLine();
string salary;
Console.WriteLine("Enter salary");
salary=Console.ReadLine();
Console.WriteLine("_______Employee Information_________");
DateTime dt = DateTime.Now;
Console.WriteLine(" Today Date={0}",dt);
Console.WriteLine("|Employee Name={0}\t\t|",name);
Console.WriteLine("|Father Name={0}\t\t|",fname);
Console.WriteLine("|Phone No={0}\t\t\t|",pno);
Console.WriteLine("|Designation={0}\t\t\t|",designation);
Console.WriteLine($"|Date of Hiring={datejoin}\t\t|");
Console.WriteLine("|Salary={0}\t\t\t\t|",salary);
Console.WriteLine("-------------------------------------");
}
}
}
Comments
Post a Comment