1.

Write a program which checks if arbitrary segments \(a\), \(b\) and \(c\) can be used to build a triangle. The program then should find what kind of a triangle it is (equilateral, right-angled, isosceles). Variables \(a\), \(b\) and \(c\) should be declared as global and their values should be read in an appropriate function.

2.

Add to the program a function which finds the longest side of the triangle. The length should be returned as the function return value. Call the function in main function and print the result.

3.

Write a program calculating value of the factorial of n. Use the for loop and do not use a function. Find the maximum value of \(n\) for which the result can be stored using int type without truncation.

4.

Modify the program from previous point in such a way that the main function contains only calls to three functions: ReadN(), Calculate() and PrintN(). Variable n can be declared as a global one.

5.

Modify the program in such a way that variable \(n\) is declared as a local variable inside the main function.

6.

Modify program in order to use while loop instead of for loop.