Task 2 Write a function to determine if the given year is a leap year. If it is, return 1, otherwise return 0.
Task 3 Write and test a function to print Floyd's triangle of n rows.
Number of rows of Floyd's triangle to print is entered by the user.
If n is 4, then the output should be as follows :
1
2 3
4 5 6
7 8 9 10
Task 4 Write and test a recursive C-function that calculates the series: 1+2+3+4+5+.........+N.
Task 5. Write and test the following recursive function that returns the nth square number:
long sqrFun(int n)
the square numbers are 0, 1, 4, 9, 16, 25, 36, ...
Note that s(n)=s(n-1)+2n-1 for n>1.
Task 6 Write and test a function which accepts any month-year and displays the calendar of the month.
For example, if the input is: 06-2014
then the output should be something like this:
JUNE, 2014
SUN MON TUE WED THU FRI SAT
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
void Floyd_triangle(unsigned int row)
//递归计算1+2+3+4+5+.........+N.
//returns the nth square number