Kala complained today about too much work and not sure where to start. I come up a solution for her:
1st: assign all the stuffs to each fingers
2nd: count how many fingers have been assigned, go to step 3
3rd: repeat step 2 to confirm while not 5:20pm
4th:itʼs 5:20pm, time to go home, count fingers again tomorrow
To teach her some introduction of C#, here's a simple translation:
//step 1
for(int i=0; i
{
myfingers[i] = (Object)stuffs_to_work_on[i];
if(i>9) break; //count to 9 b/c it's 0 based, which means 1st object is at index 0
}
//step 2
int fingersAssigned;
foreach(finger f in myfingers)
{
if(f.IsAssigned())
fingersAssigned++; //here, ++ means add 1. which is equal to fingersAssigned = fingersAssigned + 1
}
//step 3
while(System.Time.Now() <> 5.20
{
Console.WriteLine("KALA has " + fingersAssigned + "shxt to work on"); //Kala telling people how busy she is
}
//step 4 say goodbye to boss
return 0; //going home safely
Not the best data model, but it works for Kala.
Afternoon defeats and victories at night
7 years ago
1 comments:
Look at my hands, I don't have enough fingers to count with.
Post a Comment