This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: DoWhile and For Loops 3 Next Slide Previous Slide Given a value for halflife we can calculate the corresponding decay constant, k. eqn6 ) . ln( ln / , , kt 5 C C 2 1 i CO f CO 2 2= = 7 eqn 2 / 1 ) 5 . ln( t k= eqn8 ) ( , e C t C kt i CO CO 2 2= Now, we let t f =t, and solve for the CO 2 concentration as a function of k and time, t. The model: calculating the halflife constant Chapter 2.7: DoWhile and For Loops 4 Next Slide Previous Slide Determining the half life effect on CO 2 concentration. Using the model enter halflife strart dowhile calculate decay constant print results in forloop end dowhile repeat for different halflife, if desired use forloop to calculate CO 2 value from 0 to 80 years, in 5 year increments co2_half_life_loop.cpp...
View
Full Document
 Spring '08
 ALL
 Radioactive Decay, Atmosphere, Greenhouse gas, previous slide

Click to edit the document details