If State In A DO LOOP - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › If 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 |
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
Google Launches Cloud Developer Challenge • Become An Expert In Asp.net Application/sql Server • Register For Facebook Cyberxchange Hackathon