Astro 503 Homework #1 Due Jan 17, 2006 Email your programs (as attachments) to garyb@physics.upenn.edu AND reiko3@physics.upenn.edu 1. Write a program that uses every C++ operator (except pointers and references) on the appropriate type of built-in variable, and prints out the results. I list the operators here for your convenience. unary + - prefix ++ -- postfix ++ -- binary + - * / & ^ | ~ << >> % comparison < > <= >= == != logical ! && || ternary ?: assignment = += -= *= /= &= ^= |= <<= >>= %= sequential , (not yet: address operator &, indirection operator *) 2. a) Write a program that returns the date of Nth day of the year Y. N and Y can be entered as command-line arguments or at standard input, your choice. b) Write a subroutine that calculates # days between 1/1/2000 to any other date up to year 2500, or returns a negative count for dates back to 1800. Then use this in a driver program that calculates the number of days between any two dates, when the dates are entered at standard input in the format MM DD YYYY, e.g. 06 01 1962. When executed, the interaction with your program will look like this: garyb> datecount Enter first date-> 06 01 1962 Enter second date-> 01 10 2006 Number of days is 50612 (the answer above is wrong).