Skip to content

MensturalMate is a simple menu driven period calculator build in C language as part of my mini-project in MCA Semester 1

Notifications You must be signed in to change notification settings

milan-sony/mensturalmate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon

MensturalMate

A simple menu driven period calculator build in C language as part of my mini-project in MCA Semester 1

Run locally

To run this project, you need to install an IDE/Code Editor (Visual Studio Code is preferable) and also a C/C++ compiler on your system. Some popular compilers are:

  1. GCC on Linux
  2. GCC via Mingw-w64 on Windows
  3. Microsoft C++ compiler on windows
  4. Clang for XCode on MacOS

Check out this link to know how to run a C program in Visual Studio Code.

To compile the code

  gcc periods_tracker.c -o periods_tracker

Run the code

  .\periods_tracker

Sample code

// stucture to hold the period details
struct period_details
{
    int day;
    int month;
    int year;
    int cycle_length;
    int period_length;
}periods;
    int day = periods.day;
    int month = periods.month;
    int year = periods.year;
    int days_in_month;
for (int i = 0; i < 3; i++){
    day += periods.cycle_length;
    if (day > days_in_month){
        day -= days_in_month;
        month++;
        if (month > 12){
            month = 1;
            year++;
         }
     }
     printf("\t=> \t%d/%d/%d\n\n", day, month, year);
}

Screenshot

About

MensturalMate is a simple menu driven period calculator build in C language as part of my mini-project in MCA Semester 1

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages