Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

IPC-Workshops/Workshop03.pdf at master · Seneca-144100/IPC-Workshops · GitHub Skip to content XXXXXXXXXXSign up XXXXXXXXXXWhy GitHub? XXXXXXXXXXFeatures → Mobile → Actions → Codespaces → Packages →...

1 answer below »
IPC-Workshops/Workshop03.pdf at master · Seneca-144100/IPC-Workshops · GitHu


Skip to content













XXXXXXXXXXSign up












    


XXXXXXXXXXWhy GitHub?





XXXXXXXXXXFeatures →
    Mobile →
    Actions →
    Codespaces →
    Packages →
    Security →
    Code review →
    Issues →
    Integrations →
    GitHub Sponsors →
    Customer stories→



    
XXXXXXXXXXTeam

    
XXXXXXXXXXEnterprise

    


XXXXXXXXXXExplore





    Explore GitHub →
XXXXXXXXXXLearn and contribute
    Topics →
    Collections →
    Trending →
    Learning Lab →
    Open source guides →
XXXXXXXXXXConnect with others
    The ReadME Project →
    Events →
    Community forum →
    GitHub Education →
    GitHub Stars program →



    
XXXXXXXXXXMarketplace

    


XXXXXXXXXXPricing





XXXXXXXXXXPlans →
    Compare plans →
    Contact Sales →
    Education →














    











XXXXXXXXXXIn this repository


XXXXXXXXXXAll GitHu




Jump to

    
No suggested jump to results

    











XXXXXXXXXXIn this repository


XXXXXXXXXXAll GitHu




Jump to

    











XXXXXXXXXXIn this organization


XXXXXXXXXXAll GitHu




Jump to

    











XXXXXXXXXXIn this repository


XXXXXXXXXXAll GitHu




Jump to



XXXXXXXXXXSign in

Answered Same Day Sep 30, 2021

Solution

Vaibhav answered on Oct 01 2021
140 Votes
w3p1.c
#include #include #define MIN_YEAR 2010
#define MAX_YEAR 2021
int main() {
const int JAN = 1, DEC = 12;
int year, month;
printf("General Well-being Log\n");
printf("=========================\n");
do {
printf("Set the year and month for the well-being log (YYYY MM): ");
scanf("%d %d", &year, &month);
if (year < MIN_YEAR || year > MAX_YEAR) {
printf(" ERROR: The year must be between 2010 and 2021 inclusive\n");
}
if (month < JAN || month > DEC) {
printf(" ERROR: Jan.(1) - Dec.(12)\n");
}
if ((year >= MIN_YEAR && year <= MAX_YEAR) &&
(month >= JAN && month <= DEC)) {
printf("\n*** Log date set! ***\n");

eak;
}
} while (1);
printf("\nLog starting date: %d", year);
switch (month) {
case 1:
printf("-JAN-01\n");

eak;
case 2:
printf("-FEB-01\n");

eak;
case 3:
printf("-MAR-01\n");

eak;
case 4:
printf("-APR-01\n");

eak;
case 5:
printf("-MAY-01\n");

eak;
case 6:
printf("-JUN-01\n");

eak;
case 7:
printf("-JUL-01\n");

eak;
case 8:
printf("-AUG-01\n");

eak;
case 9:
printf("-SEP-01\n");

eak;
case 10:
printf("-OCT-01\n");

eak;
case 11:
printf("-NOV-01\n");

eak;
case 12:
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here