Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

FizzBuzz Console Application (C#)

Description

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.


Example Input

2 3 7

Example Output

1 Fizz Buzz Fizz 5 FizzBuzz 7


How to Run

  1. Open a terminal.
  2. Navigate to the project folder.
  3. Run the program with:
dotnet run

Features

  • 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

Technologies

  • C#
  • .NET Console Application

Author

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)


AI - Help

Student practice project for learning C# programming with error fixed image

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages