Question: There are approximately 3.154e 7 seconds in a year. Write a program that takes the age in integer years as input, and prints the equivalent
There are approximately 3.154e 7 seconds in a year. Write a program that takes the age in integer years as input, and prints the equivalent number of seconds as output. a) Prompt the user for their age in whole numbers. b) Calculate the user's age in the number of seconds that they have lived. c) Display the age both in years and in seconds using the scientific notation (with 2 decimal points) like follows: 1 year is 3.15e7 seconds. Note: Use a constant macro for the conversion factor.
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
