Public Function Factorial(N As Long) As Long
If N < 0 Then
MsgBox "invalid argument for Factorial"
Exit Function
ElseIf N < 2 Then
Factorial = 1
Exit Function
End If
Factorial = N * Factorial(N-1)
End Function
fill both buckets up tilt to 45% half the water falls out
Here you go David.Quite a number of years ago one of my staff came in with a maths question that was given out a homework from the junior school. I have even set the task to plenty of so called mathamaticians to come up with the FULL solution.
Take a look at the attached spreadsheet for the layout of the question. But basically there are 20 questions numbered 1 - 20 and coincidently the answer to each question is 1 - 20. Therefore the anwer to question 1 is 1, likewise the answer to question 16 = 16. All you have to do is to fill in the mathmatical symbols betwen the numerators so that the question number equals the answer.
It is not a one-way street in which either party treats the other dissimilarly.
However in the UK when you change jobs your new employer can see from your P45 what you were being paid by your old employerAnd as my previous employer has a company policy that all ex employees do not divulge such information I have to honour that. If they really want to know then they should contact my previous employer direct.
Last try lol.
Look I understand your point but here's mine.
They didn't ask for a basic loop. They asked you for the understanding of how a sort array ACTUALLY works. ie. Do you use bubble, insertion etc etc and to have the mechanical understanding of that accessible instantly without IDE and then code it.
If you can't do a For i as integer = 0 to x.count -1 in notepad, then I agree but that wasn't what was asked for.
I don't need a refresher on a basic loop because yes, for my sins, I have to do that everyday. But I quickly had to google the insertion method for sorting to refresh myself of the mechanics of it, from there I was good to go.
My brain couldn't pull the insertion method of sorting because it was 'archived' long ago. If I had to keep re-coding that algorithm daily instead of encapsulating it within a single method I could have answered the question but I wouldn't have got anything done in the past x amount of years.
It was a deliberately tough question to cut down the numbers. It would have culled me but then I don't care to memorize all the mechanics of every single algorithm ever written for the reasons I've stated.
Well I think I would have told him to get lost!
I don’t think I would have put it quite that bluntly, but that’s the general attitude I would have taken. You were attending an interview for an MS access job, not to see if you would be any good in the pub quiz team!
Let me ask you an intelligence question I once heard:
A small boy he lives in a block of flats, when he goes to school in the morning he takes the lift, when he comes home at night, he takes the lift and stops at the fourth floor, then takes to the stairs to complete his journey home. Why?
What's a flat and what's a lift?
A lift sounds like an elevator.
And a flat sounds like a one story building.
dwelling place that is all on one level