Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write this program in C In this assignment, you will write a program that has two functionalities: First, it outputs the weeks of a Gregorian

Write this program in C

image text in transcribed

In this assignment, you will write a program that has two functionalities: First, it outputs the weeks of a Gregorian month given a year number and month name. For example, if the user requests to see the weeks of January 2021", your program should draw the following table on the screen: Su Mo Tu We Th Fr Sa 1 2 3 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Another functionality of your program is that it should be able to count the number of days between two dates; e.g. given the dates 01/06/2021 01/12/2021, your program should prints 6 on the screen; while for input "01/12/2021 01/06/2021, you program must print -6 on the screen. 1 Program Input Commands There are two valid commands for your program: "count MM/DD/YYYY mm/dd/yyyy" and print MM/YYYY where mm and MM represent months, dd and DD represent days, and yyyy and YYYY represent years. If an invalid command is entered, your program should print an error message. In this assignment, you will write a program that has two functionalities: First, it outputs the weeks of a Gregorian month given a year number and month name. For example, if the user requests to see the weeks of January 2021", your program should draw the following table on the screen: Su Mo Tu We Th Fr Sa 1 2 3 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Another functionality of your program is that it should be able to count the number of days between two dates; e.g. given the dates 01/06/2021 01/12/2021, your program should prints 6 on the screen; while for input "01/12/2021 01/06/2021, you program must print -6 on the screen. 1 Program Input Commands There are two valid commands for your program: "count MM/DD/YYYY mm/dd/yyyy" and print MM/YYYY where mm and MM represent months, dd and DD represent days, and yyyy and YYYY represent years. If an invalid command is entered, your program should print an error message

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions