This is a simple console application written in C#. The program asks the user to enter three numbers separated by spaces:
- X
- Y
- N
The program then prints numbers from 1 to N.
Rules:
- If a number is divisible by X, the program prints Fizz.
- If a number is divisible by Y, the program prints Buzz.
- If a number is divisible by both X and Y, the program prints FizzBuzz.
- Otherwise, the program prints the number.
The program also checks that the user enters three numbers separated by spaces.
2 3 7
1 Fizz Buzz Fizz 5 FizzBuzz 7
- Open a terminal.
- Navigate to the project folder.
- Run the program with:
dotnet run
- Reads user input from the console
- Validates that input contains three numbers
- Displays FizzBuzz results
- Allows the user to run the program multiple times
- Exits with a goodbye message when the user enters N
- C#
- .NET Console Application
Student practice project for learning C# programming. First with kattis https://open.kattis.com/submissions/19574853 Then write in the VSCode terminal (dotnet new console -n TestFizzBuzz) and (cd TestFizzBuzz) and (dotnet run program.cs)
Student practice project for learning C# programming with error fixed 