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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!