Introduction to Control Statements: Implementing a Number Guessing Game in C++
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
Direzione di ricerca
Crea number_guessing_game.cpp come descritto nell'issue. Inizia esaminando i programmi C++ esistenti per principianti nel repository, quindi compila ed esegui il programma con più tentativi. È completato quando viene generato un numero casuale da 1 a 100, vengono mostrati suggerimenti come «più alto»/«più basso» e compare un messaggio di vittoria dopo il tentativo corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Embark on a coding adventure with this interactive C++ task! This beginner-level challenge will introduce you to control statements and user input handling by guiding you to create a number guessing game.
Task:
Your challenge is to develop a C++ program for a number guessing game. Generate a random number between 1 and 100 and allow the user to guess the number. Provide hints (higher, lower) until the user correctly guesses the number.
Instructions:
- Fork this repository to your GitHub account.
- Clone the forked repository to your local machine:
git clone https://github.com/KALIIOWORK/basic_c-_programs.git - Create a new C++ file named
number_guessing_game.cpp. - Implement a function to generate a random number between 1 and 100.
- Implement the main game logic, allowing the user to input their guess and providing appropriate hints.
- Ensure the game displays a victory message when the user guesses the correct number.
- Test your number guessing game with multiple attempts to validate its functionality.
- Compile and run your program to confirm it works as intended.
- Commit your changes and push them to your forked repository.
- Open a pull request with your changes.
Note:
This task will strengthen your understanding of control statements and user interaction in C++. Building an interactive game is a fun way to practice your skills. Enjoy coding and happy gaming! 🎮✨
- Lingua principale
- C++
- Stelle
- 0
- Fork
- 6
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KALIIOWORK/basic_c-_programs
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
KALIIOWORK/basic_c-_programs#8 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 1/5 1-3 ore Idoneità per principianti 45/100
KALIIOWORK/basic_c-_programs#7 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
KALIIOWORK/basic_c-_programs#3 · 1 commento ·
Tutte le issue di KALIIOWORK/basic_c-_programs
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google/libultrahdr#485 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
godotengine/godot#123776 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 60/100
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ros2/common_interfaces#344 ·