Question
Write a program in C language to compute the approximate age in seconds of the longest known life of a tree using integer variable types
Write a program in C language to compute the approximate age in seconds of the longest known life of a tree using integer variable types (Dont use floating point numbers anywhere. That is types such as float or double):
Declare an integer variable named Age.
Declare an integer variable named SecondsInAYear.
Declare an integer variable named CWID.
Assign the numerical part of CWID to CWID.
A Bristlecone pine tree named Methuselah is known to have lived 5067 years in 2017.
The tree is still alive, so each year the age increases.
Print your name, the value of CWID, and the computed value of the Methuselahs age in Seconds on its 5067 th birthday, computed from Age. Be sure the C program does the computation.
For this assignment assign 31557600 to SecondsInAYear to convert years to seconds.
Note: The definition of a Year is hardly exact, as it can be defined several different ways. The value of 31557600 seconds is an approximate time for the earth to complete one orbit of the sun, which is the basis for most modern time and calendars.
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