- Course
- Functions A
- Function greeting and farewell
Function greeting and farewell
Last updated:
8/23/2020
⁃
Difficulty:
Easy
Create a C# program that implements two methods to greet and say goodbye. Then you must run them from the Main of the program.
Input
Output
Hello
Good Bye!
Solution
using System;
class FunctionGreetingFarewell
{
public static void Main(string[] args)
{
Greeting();
Farewell();
}
public static void Greeting()
{
Console.WriteLine("Hello");
}
public static void Farewell()
{
Console.WriteLine("Good Bye!");
}
}