DietTrack is a simple command-line application written in C that allows users to track their daily meals and monitor total calorie intake.
This project was developed as part of my C programming practice, focusing on structured programming, user interaction, and data organization using structs.
DietTrack helps users:
- Add meals with a name and calorie value
- Display a summary of recorded meals
- Calculate total daily calorie intake
- Receive feedback based on recommended calorie ranges
The program is designed for educational purposes and demonstrates core C programming concepts in a practical context.
- Meal registration (name + calorie count)
- Storage of up to 10 meals per session
- Automatic total calorie calculation
- Intake evaluation:
- Below recommended range (< 2000 cal)
- Healthy range (2000–2500 cal)
- Above recommended intake (> 2500 cal)
- Input validation for maximum meal limit
- Clear console interface with structured menu system
This project showcases:
- Struct usage (
typedef struct) - Arrays of structures
- Pointers (passing count by reference)
- Loops and conditional logic
- String handling (
fgets,strcspn) - Basic input handling with
scanf - Modular function design
DietTrack/ │ ├── src/ │ └── main.c └── README.md
Using GCC: gcc src/main.c -o DietTrack
On Windows: DietTrack.exe
On Linux / macOS: ./DietTrack
This project was built to strengthen my understanding of:
- Structured programming in C
- Memory organization with arrays
- User-driven program flow
- Writing clean and modular code
NGUEDJIO Demessmer
Engineering Student – Computer Science