-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
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! 🧮✨
Reactions are currently unavailable