Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started