Interview Question

Entry-Level Applications Developer, Belton, TX Interview Belton, TX

Write a code that takes an input number and outputs the sum

  of all the EVEN numbers from that number down to zero. Write a function that, given a number as input, returns the factorial of that number.
Answer

Interview Answer

2 Answers

0

With the factorial question - ask if prefer as iteration or recursion.
SQL - INSERT INTO Persons (P_Id, LastName, FirstName) VALUES (5, 'Smith', 'Mary')

Interview Candidate on Jan 22, 2013
0

while loop tests for number > 0 containing an if test that checks for number % 2 == 0

Interview Candidate on Apr 1, 2014

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up