I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..
using System;
public class functionexcercise
{
public static void welcome(string name)
{
Console.WriteLine("Welcome " + name );
}
public static void HaveAnice()
{
Console.WriteLine("Have a nice day");
}
public static void Main(string[] args)
{
string str1;
Console.Write("Please Enter a name : ");
str1 = Console.ReadLine();
welcome(str1);
HaveAnice();
Console.ReadLine();
}
}
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..
Result:
Please Enter a name : Rohit
Welcome Rohit
Have a nice day
need an explanation for this answer? contact us directly to get an explanation for this answer