Skip to content

A number-guessing game that uses user input, operations, booleans, if / else if / else statements, while statements, break and continue.

Notifications You must be signed in to change notification settings

super-era/number-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Number guessing game

Purpose

This C# project is part of Lesson 4 (CLG C# course), and aims to use user input, operations, booleans, if / else if / else statements, while statements, break, continue and other concepts to build a simple savings calculator.

How to run this project

This project was created using Visual Studio Code with the C# OmniSharp extension. Download the .zip file from github and extract to a suitable folder. Open Program.cs in Visual Studio Code. Use the commands

dotnet build

dotnet run

to initialise the project, and follow the prompts to play the guessing game.

Concepts this project uses

  • Console.WriteLine()
  • Console.ReadLine()
  • Trim()
  • ToLower()
  • int.Parse()
  • boolean values
  • operators (+ etc)
  • comparative operators (<=, etc)
  • Random() and Next()
  • if / else if / else statements
  • while statments
  • break
  • continue

Change log

08/03/2021 - first draft uploaded to github.

09/03/2021 - fixed indentation, added some extra comments, renamed variables for clarity

About

A number-guessing game that uses user input, operations, booleans, if / else if / else statements, while statements, break and continue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages