The Julian Day Number (JDN) is a sequential count of days since the beginning of the Julian Period. Day number zero corresponds to 1 January 4713 BCE. 1 January 2001 was day number 2451911, while 1 January 2020 was day number 2458850.

The Julian Day Number (JDN) is a sequential count of days since the beginning of the Julian Period. Day number zero corresponds to 1 January 4713 BCE. 1 January 2001 was day number 2451911, while 1 January 2020 was day number 2458850.

To compute the JDN for a specific date, we need its month number (an integer between 1 and 12, where January = 1, February = 2, etc.), day (an integer between 1 and 31), and year (a four-digit integer). The JDN is calculated with the following formulas, using only integer arithmetic:

a <- [ ( 14 - month ) / 12 ] { Note: [ a / b ] means integer quotient only - no remainders or decimals! }
b <- ( month − 3 ) + ( 12 x a )
c <- 4800 + year - a
d <- [ c / 4 ] - [ c / 100 ] + [ c / 400 ]
jdn <- day + [ ( ( 153 x b ) + 2 ) / 5 ] + ( 365 x c ) + d - 32045

1. Create an IPO chart for a program that asks the user to input a date, then computes and displays the corresponding JDN. The program will prompt the user as shown in the sample below, and your program should match this sample as closely as possible (the underlined numbers in bold are examples of inputs made by the user your program will not underline the user's inputs or show them in bold):

Enter a month number (Jan=1, Feb=2, etc.): 6
Enter a day number (1..31) : 1
Enter a year using four digits : 1972

The JDN for 6/1/1972 is 2441470

2. Create a structure chart for the program. Your program must separate input, processing, and output into at least three independent modules that are called in sequence by the main module.

3. Write pseudocode for the main module of your program and one other module.

4. Implement in C++ the program that follows from your analysis and design work.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.