๐ I Built a Command-Line Calculator in C (v1 & v2) โ Now Iโm Working on a GTK GUI Version (v3)
๐ Hi! Iโm Guntu Jothi Ganesh, a 18-year-old self-taught developer with a growing passion for system-level programming and open-source. I recently completed two versions of a command-line calculator using C, and now I'm building a GUI version using GTK+ 3 on Windows.
This post is a quick showcase of my progress, what Iโve learned, and what Iโm working toward.
๐ ๏ธ What I Built
๐น Version 1: Basic Calculator
- Operates with
+,-,*,/ - Takes two inputs and an operator
- Displays a result with simple output
๐น Version 2: Improved CLI Calculator
- ๐ Added a loop for continuous calculations
- โ Checks for divide-by-zero
- ๐ฏ Cleaner input/output formatting
- ๐งน Graceful exit
๐ GitHub: calculator_v2.c
๐งฉ Now Building: Version 3 - GUI Calculator with GTK
Iโm currently working on a graphical calculator using GTK+ โ built in C with a nice interface, buttons for input, and result display in a GUI window.
GTK Features in Progress:
- ๐ฑ๏ธ Buttons for digits and operations
- ๐ช GTK window with layout design
- ๐ง Future plan: scientific operations (log, sin, cos, etc.)
- ๐ก Learning how to use GTK in MSYS2 on Windows
๐ GitHub (work-in-progress): gtk_calculator_v3
๐ What Iโve Learned So Far
- Using
switch-case, input handling, and loops in C - How to avoid
scanfpitfalls - Writing readable, maintainable C code
- Compiling GTK projects with
gccandpkg-config - Publishing releases and managing GitHub repos
๐ฏ Whatโs Next?
- Polish the GTK interface and layout
- Add scientific calculator functions
- Package it cleanly with README, screenshots, and instructions
- Start contributing to beginner open-source C projects
๐ฃ I'd Love Your Feedback!
If youโre a C dev, GTK user, or just exploring programming, Iโd love to hear your thoughts and suggestions. Feel free to drop a comment or check out my GitHub!
๐ Connect with Me
- GitHub: logicCrafter320
- Reddit: [u/logicCrafter320](https://www.reddit.com/user/Shoddy_Economy_1646/

Top comments (0)