Excited to share my first C++ project – Simple Calculator! 💻 Here is the code for a basic calculator that performs: ✔ Addition ✔ Subtraction ✔ Multiplication ✔ Division 📌 Logic: Takes two numbers and an operator as input Uses switch-case to perform operations Displays result based on user input 🔗 Code attached / GitHub link in comments I am continuously learning and improving my coding skills. 💡 Feedback is welcome! #cpp #coding #github #beginners #learningjourney
C++ Calculator Project: Basic Arithmetic Operations
More Relevant Posts
-
🎉 Day 13 of My 100-Day Programming Challenge! 🚀 Today, I solved the “Minimum Absolute Distance Between Mirror Pairs” problem on LeetCode. The goal is to find the minimum index distance between pairs where one number is the reverse of the other. 🧩 🔍 Approach: I used a HashMap + number reversal technique to efficiently track and compare mirror pairs. ⚙️ Steps: • Traverse the array from left to right • Reverse the current number • Check if the current number already exists in the map • If yes → calculate distance using i - previousIndex • Store the reversed number in the map for future matches 💡 Key Insights: ✔ Reversing numbers helps identify mirror pairs quickly ✔ HashMap enables O(1) lookup for efficient comparison ✔ Single pass solution makes it optimal 🧠 Complexity: • Time Complexity: O(n × d) (d = number of digits) • Space Complexity: O(n) A great problem to strengthen concepts in Hashing, Number Manipulation, and Optimization. Consistency continues — let’s keep building! 💻🔥 #100DaysOfCode #Java #LeetCode #DSA #HashMap #Programming #CodingChallenge
To view or add a comment, sign in
-
-
🚀 Day 5 of My C Programming Journey Today, I explored one of the most important concepts in C — Functions. Functions help in writing clean, modular, and reusable code. Instead of repeating the same logic again and again, we can simply call a function and get the work done efficiently. ✴️What I learned today: What is a function and how it works Types of functions in C: ✔️ No arguments, no return value ✔️ Arguments, no return value ✔️ No arguments, with return value ✔️ Arguments, with return value ✴️Variables inside functions: Local variables (inside function) Parameter variables (passed in function) Static variables (retain value) Global variables (accessible everywhere) 💡 Functions make code: More organized Easy to debug Easy to maintain 📌 Practiced writing functions and understood how data flows between them. Consistency is key — learning step by step! 💻 #Day5 #CProgramming #CodingJourney #LearnToCode #ProgrammingBasics
To view or add a comment, sign in
-
-
🎉 Day 9 of My 100-Day Programming Challenge! 🚀 Today, I solved the “Number of Steps to Reduce a Number to Zero” problem on LeetCode. The task is simple yet interesting — reduce a number to zero by applying the following rules: • If the number is even → divide it by 2 • If the number is odd → subtract 1 🔍 Approach: I used a recursive approach to repeatedly apply the rules until the number becomes zero, while counting the number of steps taken. ⚙️ Steps: • Check if the number is zero → return steps • If even → divide by 2 and increment steps • If odd → subtract 1 and increment steps • Continue recursively until reaching zero 💡 Key Insights: ✔ Demonstrates the concept of recursion and base condition ✔ Simple logic but helps build strong fundamentals ✔ Can also be solved iteratively for better space optimization 🧠 Complexity: • Time Complexity: O(log n) • Space Complexity: O(log n) (due to recursion stack) Another great problem to strengthen problem-solving and recursion skills. Consistency is key — onto Day 10! 💻🔥 #100DaysOfCode #Java #LeetCode #DSA #Recursion #Programming #CodingChallenge
To view or add a comment, sign in
-
-
Exploring the 4 Pillars of C++ Programming Understanding the fundamentals of Object-Oriented Programming is key to becoming a strong developer. Here are the core pillars that shape powerful and scalable applications: 🔹 Encapsulation – Protects data by restricting access and allowing interaction only through methods. 🔹 Abstraction – Hides complexity and shows only what’s necessary. 🔹 Inheritance – Promotes code reusability by creating relationships between classes. 🔹 Polymorphism – Enables one interface to be used for multiple implementations. These concepts not only strengthen coding skills but also help in building clean, efficient, and maintainable software. 💡 Continuously learning and improving my understanding of core programming concepts. #CPlusPlus #OOP #Programming #SoftwareDevelopment #TechLearning #CodingJourney #ComputerScience
To view or add a comment, sign in
-
-
Just discovered something interesting in C++ In C++: 👉 arr[i] and i[arr] are exactly the same. 𝗪𝗵𝘆? Because arr[i] is just pointer math: arr[i] == *(arr + i) i[arr] == *(i + arr) Since addition is commutative, both give the same result. 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆: You might never write i[arr] in real-world code, but understanding this gives you a deeper insight into how C++ actually works. #CPP #Programming
To view or add a comment, sign in
-
-
🚀 Just Launched: My C++ Learning Repository on GitHub! This is more than just code — it’s my journey of learning and improving every day. From: ❌ Basics confusion ➡️ Understanding OOP ➡️ Exploring STL ➡️ Solving problems with DSA 💡 What’s inside: • C++ fundamentals • OOP concepts • STL (vectors, maps, iterators) • File handling • Practice problems 🎯 Goal: To build strong problem-solving skills and grow as a developer. 🔗 GitHub Repo: https://lnkd.in/gWrtZDCU 💬 I’d love your feedback! 🔥 Small steps daily = big results. #cplusplus #programming #github #dsa #oop #codingjourney
To view or add a comment, sign in
-
-
🚀 Day 5 – C Programming Journey Today I explored how functions make code modular and efficient. 🔹 Default Functions – No parameters, fixed tasks. 🔹 Parameterized Functions – Accept arguments for flexible operations. Understanding these types helps write cleaner, reusable code. #CProgramming #CodingJourney #Learning #SoftwareDevelopment
To view or add a comment, sign in
-
-
I’m excited to share my C programming repository hosted on GitHub: 🔗 https://lnkd.in/gy-snCta This repository contains a collection of C programs designed to demonstrate fundamental programming concepts, including control structures, loops, arrays, functions, and pointers. It serves as a practical resource for strengthening problem-solving skills and building a solid foundation in structured programming. The code is written with clarity and simplicity, making it suitable for beginners, students, and anyone interested in learning or revising core C programming concepts. This work reflects my continuous effort to improve coding proficiency and apply logical thinking to real-world problems. I look forward to feedback, suggestions, and collaboration from the developer community. #CProgramming #GitHub #Coding #Programming #Learning #Developers
To view or add a comment, sign in
-
Day 5 💻 Today I learned about functions in C programming and their different types. Understanding how functions work makes coding more structured, reusable, and easier to manage. Explored how functions can take arguments, return values, or both — and how they help break down complex problems into smaller parts. This concept really shows the importance of writing clean and modular code. Learning step by step, building a strong foundation 🚀 #CProgramming #CodingJourney #FunctionsInC #ProgrammingFundamentals #SoftwareDevelopment #ContinuousLearning
To view or add a comment, sign in
-
-
I recently worked on a structured comparison of C vs C++, covering key concepts like programming approach, OOP features, memory management, and more. Understanding these fundamentals helps build a strong base in programming and improves problem-solving skills. #Programming #C #CPP #Learning #TechSkills #SoftwareDevelopment
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Exsited my c++ simple calculater please feedback