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 »
I have a coding assignment in C. All the instructions are on the rubric I send. Can you also not use code that's too advanced. I'm only on my third week of college. Thanks.


IPC-Workshops/Workshop03.pdf at master · Seneca-144100/IPC-Workshops · GitHub Skip to content Sign up Why GitHub? Features → Mobile → Actions → Codespaces → Packages → Security → Code review → Issues → Integrations → GitHub Sponsors → Customer stories→ Team Enterprise Explore Explore GitHub → Learn and contribute Topics → Collections → Trending → Learning Lab → Open source guides → Connect with others The ReadME Project → Events → Community forum → GitHub Education → GitHub Stars program → Marketplace Pricing Plans → Compare plans → Contact Sales → Education → In this repository All GitHub ↵ Jump to ↵ No suggested jump to results In this repository All GitHub ↵ Jump to ↵ In this organization All GitHub ↵ Jump to ↵ In this repository All GitHub ↵ Jump to ↵ Sign in
Answered Same DaySep 30, 2021

Answer To: IPC-Workshops/Workshop03.pdf at master · Seneca-144100/IPC-Workshops · GitHub Skip to content...

Vaibhav answered on Oct 01 2021
139 Votes
w3p1.c
#include
#include
#define MIN_YEAR 2010
#define MAX_YEAR 2021
int main() {
const int JAN = 1, DEC = 12;
in
t 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");
break;
}
} while (1);
printf("\nLog starting date: %d", year);
switch (month) {
case 1:
printf("-JAN-01\n");
break;
case 2:
printf("-FEB-01\n");
break;
case 3:
printf("-MAR-01\n");
break;
case 4:
printf("-APR-01\n");
break;
case 5:
printf("-MAY-01\n");
break;
case 6:
printf("-JUN-01\n");
break;
case 7:
printf("-JUL-01\n");
break;
case 8:
printf("-AUG-01\n");
break;
case 9:
printf("-SEP-01\n");
break;
case 10:
printf("-OCT-01\n");
break;
case 11:
printf("-NOV-01\n");
break;
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