Dilbert Mystery Cache
The Cartooners: Time to go
More
-
Difficulty:
-
-
Terrain:
-
Size:  (micro)
Related Web Page
Please note Use of geocaching.com services is subject to the terms and conditions
in our disclaimer.
|
As you can see, Dilbert hasn't done any work since September.
This was the code reviewers comments on the last code that he
wrote. |
|
This was what Dilbert wrote:
|
public class DistanceWalked { int dickDastardly =
11; int dougal = 5; int scooby; int florence = 3; int totalMileage
= 0; int offset = 0; const int noOfDays = 4; public void
Page_Load(object sender, EventArgs e) { try { int dailyMileage =
CalculateDailyMileage(dickDastardly, dougal, scooby, florence); }
catch { System.Console.WriteLine("oops!!"); } switch(dailyMileage)
{ case 19: offset += 3; case 20: offset += 1; case 21: offset += 2;
case 22: offset += 2; case 23: offset += 4; case 24: offset += 3;
case 25: offset += 4; case 26: offset += 3; case 27: offset += 7;
case 28: offset += 6; case 29: offset += 4; case 30: offset += 5;
default: offset += 0; } totalMileage =
CalculateTotalMileage(dickDastardly, dougal, scooby, florence,
offset, noOfDays); System.Console.WriteLine("Total miles walked : "
+ totalMileage; } private int CalculateDailyMileage(int dist1, int
dist2, int dist3, int dist4) { return dist1 + dist2 + dist3 +
dist4; } private int CalculateTotalMileage(int dist1, int dist2,
int dist3, int dist4, int offset, int noOfDays) { int theTotal = 0;
int[] mileage = new int[] { dist1, dist2, dist3, dist4 }; foreach
(int i in mileage) { theTotal += i; } theTotal =
((Math.Round(theTotal, 2) * noOfDays) - offset) * noOfDays; return
theTotal } }
|
The cache can be found at:
N 51° (No of men in cartoon strips + 1). (theTotal * 2) - 6
W 002° (No of Blue Ties + Red Ties - Green Ties) (Sum of digits of
Day + Month of strip). (No of bugs in code - offset) (No of bugs in
my code !!) Scooby
Please note that the number of bugs in the code that is asked for
relates to what bugs exist within the code displayed here (either
at compilation and at runtime) and not any other code that is
necessary for the code to compile within an asp.net web page.
|
|
Additional Hints
(Decrypt)
2010-06-04
Gur Eryngrq Jro Cntr jvyy nffvfg va fbyivat gur svefg cneg bs gur chmmyr
2010-05-11
Cynpr gur pbqr vagb n ernqnoyr sbezng. ( Zbir rirel { naq } bagb n arj yvar bs vgf bja naq vaqrag gur yvarf sbyybjvat {. Nyfb, perngr n arj yvar nsgre rirel ; )