**evenSum.c** - Write a program that calculates and prints the sum of all even integers from 2 to X (inclusive), where 'X' is an integer value provided as input. It should keep looping until the user enters 0.

Use the following format precisely (user input in *italics*):

Enter your max number: *6*

The sum of all even numbers from 2 to 6 is 12

Enter your max number: *2*

The sum of all even numbers from 2 to 2 is 2

Enter your max number: *0*

**diamond.c** - Write a program that outputs the following shape. You may use `printf`

statements that print either a single asterisk or a blank. Maximize use of nested `for`

loops and minimize use of `printf`

statements. Define a constant, `MAX_WIDTH`

, to make your code easy to maintain - i.e., for the following output, use `#define MAX_WIDTH 9`

.

*
***
*****
*******
*********
*******
*****
***
*

**hypotenuse.c** - Define a function, called `hypotenuse()`

, which calculates the length of the hypotenuse of a right triangle when the other two sides are given as arguments to the function. Then, use this function in a program that accepts 2 integers as input and outputs the length of the hypotenuse. It should keep looping until the user enters two zero integers.

Use the following format precisely (user input in *italics*):

Enter two triangle sides: *3 4*

The hypotenuse of the right triangle with sides 3 and 4 is: 5

Enter two triangle sides: *0 0*

**prime.c** - An integer is said to be prime if it's divisible only by 1 and itself. For example, 2, 3, 5 and 7 are prime, but 4, 6, 8 and 9 are not. Write a function, called `isPrime()`

, which takes a single integer as argument and determines if it is a prime number (should return either 0 or 1). Then, use this function in a program that takes a single integer as input and outputs if the number is prime. It should keep looping until the user enters a zero integer.

Use the following format precisely (user input in *italics*):

Enter a single integer: *6*

The number 6 is not prime.

Enter a single integer: *11*

The number 11 is prime.

Enter a single integer: *0*

**reverse.c** - Write a function that takes a single integer as argument and returns the number with all its digits reversed. Then, use this function in a program that takes a single integer as input and outputs the reverse of the value given. It should keep looping until the user enters zero.

Use the following format precisely (user input in *italics*):

Enter a number: *1234*

The reverse of 1234 is 4321

Enter a number: *8374*

The reverse of 8374 is 4738

Enter a number: *0*