Repairman Steals Hard Drive And Charges To Reinstall It 181
Phase 2: Ask if they will pay you $50 to fix the computer.
Phase 3: Get charged with theft and receiving stolen property!
return (n*n+1)/2
You mean n*(n+1)/2
No, he means (int)(n*((n+1)/2.0))
No he means n * (n + 1) / 2.
For those unable to follow at home, n * (n + 1) is always divisible by 2. Let's not convert to and from floating point just for fun.
Best book ever written on leading software development projects. Personally, I don't think students should graduate with a CS degree until they've read it.
I agree, knowing how to lead software development projects is very important to a computer science degree.
Thus spake the master programmer: "After three days without programming, life becomes meaningless." -- Geoffrey James, "The Tao of Programming"