₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,213 members, 8,510,680 topics. Date: Friday, 30 October 2026 at 08:17 PM

Toggle theme

If State In A DO LOOP - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › If State In A DO LOOP (1146 Views)

1 Reply

If State In A DO LOOP by lolade123(op): 9:00am On May 05, 2013
Morning guys,i have this little problem.There is a loop of a variable "population",i want to determine the year itwill exceed 80 million,let say the year starts from 1990 to 2020.The pseudocode or fortran code will be helpful.Thanks
Re: If State In A DO LOOP by Nobody: 9:41pm On May 09, 2013
Your question is nt clear at all...make it clearer...u can explain what u want
Re: If State In A DO LOOP by adebayosun02: 3:14am On Sep 02, 2013
@ op, I think I understand ur question but my question is by what value did d population increase per year (refers to as PopIncreament)? Say PopIncreament=50000

U can write the loop like this

(using Do while loop)

PopIncreament= 50000
Yr1 = 2020
Do while Population <= 80000000
Yr1 = Yr1 + 1
Population = Population + PopIncreament
Loop


OR
(using For Next loop)


Yr1 = 2020
For Population <= 80000000 Step 50000
Yr1 = Yr1 + 1
Next Population
1 Reply

Programming Challenge: Convert String to Json with a Loop • JS Script Not Working(for_in Loop) • Help Convert This WHILE Loop Into A FOR Loop • 2 • 3 • 4

Letter From My Present To My Past • Learn How To Generate SVG (scalable Vector Graphics) With Javascript • Where Can I Get A Good "Hands-on" Tkinter Tutorial In PDF Format