Question: Part 2 use c + + not python or java Overview When working with extremely distant celestial objects, astronomers have to work not in hours
Part use c not python or java
Overview
When working with extremely distant celestial objects, astronomers have to work not in hours or days, but years and
centuries. This presents a challenge: Not every year is days, and sometimes we still want to be exact.
Your task is to write a program that converts a number of years to days. Your program must account for leap years.
To make the calculations easier, we will assume we start on January This means:
Every th year that would be has days
Every th year dots the leap year is skipped, and has days
Every th year dots the leap year skip is skipped, and goes back to having days just as a
regular leap year would
This means that every years from Jan there's not but leap years. Moreover, every years,
there's not neither but leap years.
Write a program in your source directory src named exqc This program should take a number of years as an
integer and convert it to days following the above rules. Upon nonnumerical input, your program must print out
"Error: Invalid input" and exit with a nonzero code.
Example IO
Enter number of years since Jan :
days
Enter number of years since Jan :
days
Enter number of years since Jan :
days
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
