Write a C# function to calculate and return factorial of a number.
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.
Write a JavaScript code that implements a closure to make the following code snippet work:
counter(); // returns 0
counter(); // returns 1
counter(); // returns 2
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"