Write down the program which permits the user to enter name of planet, and then prints message stating that planet's number when counted outward from sun. If user enters datum which is not a planet, your program must print message to that effect.
You will probably wish to start your program by declaring array of string literals, given below. You can then refer to name of planet i with planets[i].
char* planets[8] = {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"};
Example run might look like following:
Enter planet name: Earth
Earth is planet 3, counting outward from the Sun.