₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,038 members, 8,420,017 topics. Date: Thursday, 04 June 2026 at 09:35 AM

Toggle theme

If State In A DO LOOP - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingIf State In A DO LOOP (1127 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 LoopJS Script Not Working(for_in Loop)Help Convert This WHILE Loop Into A FOR Loop234

Google Launches Cloud Developer ChallengeBecome An Expert In Asp.net Application/sql ServerRegister For Facebook Cyberxchange Hackathon