Introduction to Functions: Building a Basic Calculator Program 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 calculator_functions.cpp nel repository e inizia esaminando i requisiti dell'attività per le quattro operazioni e il flusso di input dell'utente. Compila ed esegui il programma con diversi scenari di input; il lavoro è completato quando l'operazione selezionata produce il risultato previsto e le modifiche vengono sottoposte a push per una pull request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Take your C++ skills to the next level by building a versatile calculator program! In this beginner-friendly task, you'll dive into functions, enabling you to create a calculator that can perform various operations based on user input.
Task:
Your challenge is to develop a C++ program that functions as a basic calculator. Create separate functions for addition, subtraction, multiplication, and division operations. Allow the user to choose an operation and input two numbers, then display the result.
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
calculator_functions.cpp. - Write separate functions for addition, subtraction, multiplication, and division.
- Implement a main function that takes user input for the operation and two numbers.
- Call the corresponding function based on the user's choice and display the result.
- Test your calculator program with different input scenarios to ensure its accuracy.
- Compile and run your program to confirm it works as expected.
- 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 functions and user input handling in C++. Building a functional calculator is a great way to apply your knowledge. Have fun coding! 🧮✨
- 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#9 · 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 ·