![]() |
![]() |
|
home—info—lects—labs—exams—hws
textbook—tutor/PIs—java.lang docs—java.util docs
class Bio580 {
String birdWatchingLog( int numDays ) {
int currentDay = 1;
String messageSoFar = "Sightings:\n";
while (currentDay <= numDays) {
messageSoFar += "Day " + currentDay + ": saw " + (numDays-currentDay) + " bird(s)\n";
currentDay = currentDay + 1;
}
return messageSoFar;
}
}
|
1The ITEC department does not condone forging scientific data. ↩
home—info—lects—labs—exams—hws
textbook—tutor/PIs—java.lang docs—java.util docs
| ©2009, Ian Barland, Radford University Last modified 2009.Mar.31 (Tue) |
Please mail any suggestions (incl. typos, broken links) to ibarland |
![]() |