CPSC170A
Fundamentals of Computer Science II

Lab 1

Variables and Types

Age in Seconds

Details

Create a C++ program that prints your age in seconds. Assume there are 365 days in a year. You don’t need to compute your exact age, just convert your age in years to seconds. The program should use arithmetic operations to perform the calculations and should print the number of seconds nicely formatted an labeled.

Example

Durell's age in seconds is 1198368000


ASCII Art

Create a C++ program that prints some ASCII art when run. The art should be more complicated than a smiley face, but does not need to be realistic. You can design it yourself or do web searches for art that you can reproduce. For example if you wanted to draw a cute rabbit, you could do a Google image search ‘rabbit ascii art’.

Example

( ) ( )
(>*.*<)
(") (")