C# exercises - AngularJS/Web API Style

The application functions on this page aren't actually here - they're located on another Web server where they've been created as a .NET Web API. Use this AngularJS front-end to try them out!

(If you want to view the C# code behind these functions, visit the C# Functions page)

Sum It Up

Task: Define a function sum() that sums all the all the numbers in an array of numbers.

Enter a series of numbers separated by commas: 1,2,3,4

{{sumResult}}

Multiply Everything

Task: Define a function that calculates the product of all the numbers in an array of numbers.

Enter a series of numbers separated by commas: 1,2,3,4

{{multiplyResult}}

Just The Factorial

Task: Write a function that calculates the factorial of a number. The factorial of a non-negative interger n, denoted by n!, is the product of all positive integers less than or equal to n. (i.e. 5! = 5 x 4 x 3 x 2 x 1 = 120)

Enter a number between 1 and 100 you would like to know the factorial of:

{{factorialResult}}

Get The Max

Task: Define a function that takes 3 numbers as arguments and returns the largest of them.

{{maxOfThreeResult}}

Palindrome or Not?

Task: Define a function palindrome() that computes the reversal of a string, returning true if the string is a palindrome (the same forwards and backwards), and false otherwise.

Enter a word to test if it's a palindrome

{{palindromeResult}}

Fizz and Buzz

Task: Write a program that iterates the integers from 1 to 100, printing the numbers to the screen. For each number that is a multiple of 3, however, print "Fizz" instead of the number. For multiples of 5 print "Buzz" instead of the number. For numbers that are multiples of both print "FizzBuzz."

{{fizzbuzzResult}}