Projects: Conditionals (b)
Instructions: Create a C program that runs successfully for each project below.
Project 1
In 1977 the US launched Voyager 2, which provided incredible photos and data about our Solar System. Voyager 2 traveled to these planets:
- 1979-81 Jupiter and Saturn
- 1986-89 Uranus and Neptune
Create a program to track the location of Voyager 2 in any year from 1977 to 1989. Ask the viewer to enter a date between 1977 and 1989. Use logical operators to determine whether Voyager 2 was at a planet or not during that year.
Project 2
The last time Halley's Comet passed by Earth was in 1985. Use a conditional operator to determine whether the viewer was born before or after Halley's Comet passed by Earth.