Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

Students also viewed these Programming questions