Skip to content

2messmer/DietTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

DietTrack – Daily Calorie Tracker (C)

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.


Project Overview

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.


Features

  • 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

Technical Concepts Demonstrated

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

Project Structure

DietTrack/ │ ├── src/ │ └── main.c └── README.md


How to Compile

Using GCC: gcc src/main.c -o DietTrack


How to Run

On Windows: DietTrack.exe

On Linux / macOS: ./DietTrack


Educational Purpose

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

Author

NGUEDJIO Demessmer
Engineering Student – Computer Science

About

A daily calorie tracker written in C.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages