Question 1

Write a C# function to calculate and return factorial of a number.

Question 2

Table FoodLog

Calories EatingDate EatingTime Food
1000 Jul 1 11 am Fried Chicken
1000 Jul 1 1 pm Bubble Tea
1000 Jul 1 3 pm Spaghetti
500 Jul 2 10 am Salad
500 Jul 2 4 pm Pork Chop
400 Jul 4 9 am Hamburger

Given the data above, write a LINQ query to get the days the person ate food and the total calories eaten for that day.

Question 3

Write a JavaScript code that implements a closure to make the following code snippet work:

counter(); // returns 0
counter(); // returns 1
counter(); // returns 2

Question 4

Write a C# function to check if a string is a palindrome or not. A palindrome is a word that reads the same backward as forward, such as "taco cat", "madam" or "racecar"

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.