using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class employee
{
int ID, SAL, CAL;
string NAME;
public void accept()
{
Console.WriteLine("Enter ID");
ID = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter NAME");
NAME = Console.ReadLine();
Console.WriteLine("Enter SAL");
SAL = Convert.ToInt32(Console.ReadLine());
}
public void calc()
{
CAL = SAL * 12;
Console.WriteLine("display the cal:" + CAL);
}
}
class program
{
static void Main(string[] args)
{
employee e = new employee();
e.accept();
e.calc();
}
}
}
No comments:
Post a Comment