This Report Presented in Partial Fulfillment of the course.CSE114: Programming and Problem Solving Lab in the Computer Science and Engineering Department
We hereby declare that this lab project has been done by us under the supervision of Course Teacher’s Name, Designation, Department of Computer Science and Engineering, Daffodil International University. We also declare that neither this project nor any part of this project has been submitted elsewhere as lab projects.
CO’s Statements
CO1 Define and relate classes, objects, members of the class, and relationships among them needed for solving specific problems.
CO2 Formulate knowledge of object-oriented programming and Java in problem solving.
CO3 Analyze Unified Modeling Language (UML) models to present a specific problem.
CO4 Develop solutions for real-world complex problems applying OOP concepts while evaluating their effectiveness based on industry standards.
This chapter introduces the problem, motivation, objectives, feasibility, gap analysis, and expected outcomes.
1.1 Introduction
A scientific calculator is a tool that performs basic arithmetic and a wide range of scientific computations (logarithmic, trigonometric, exponential, factorial, etc.). Our project implements a text-based scientific calculator in C that uses standard mathematical libraries and robust input validation to emulate features of a physical calculator within a console environment.
1.2 Motivation
A command-line calculator is lightweight, fast, and platform-independent. Building it in C strengthens our understanding of modular programming, numerical computation, the C standard library (math.h), error handling, and team collaboration—skills directly applicable to systems programming and competitive programming.
1.3 Objectives
- Provide a user-friendly menu-driven text interface.
- Implement basic arithmetic: addition, subtraction, multiplication, division (with divide-by-zero protection).
- Implement advanced math: power, square root, cube root, logarithms (log10, ln), and exponential.
- Implement trigonometric functions: sin, cos, tan; inverse trig: asin, acos, atan; hyperbolic: sinh, cosh, tanh.
- Implement factorial, modulo, and absolute value.
- Ensure input validation, domain checks, and graceful handling of edge cases.
- Allow repeated calculations in a loop until user exits; maintain a clean UX.
- Technical feasibility: Uses ANSI C and standard library functions (math.h), compilable with GCC/Clang/Code::Blocks on Windows/Linux. No third-party dependencies.
- Economic feasibility: Zero cost—free compilers/IDEs. Suitable for low-resource machines.
- Operational feasibility: Simple text UI; easy to use, learn, and test.
Many sample calculators handle only basic operations or omit domain validation. Our implementation covers a wider function set and emphasizes robust validation (e.g., non-positive logs, negative square roots, out-of-domain inverse trigs), improving reliability.
1.6 Project Outcome
A portable C program that:
- Executes a comprehensive set of scientific operations accurately
- Demonstrates modular code design and safe input handling.
- Serves as a reusable template for future coursework and extensions (history, memory, angle-unit modes).

