Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,698 members, 7,805,873 topics. Date: Tuesday, 23 April 2024 at 07:40 AM

If State In A DO LOOP - Programming - Nairaland

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

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)

(1) (Reply)

If State In A DO LOOP by lolade123: 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)

Goodbye Grails / Pls, How Can I Save A Document As .pdf, .doc In PHP? / Ten Great UX/UI Design Cheat Sheets

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 5
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.