Problems
Problem 0.1
In section 0.5.4, the modulo operator is used in the primality() function to compute modulo 2. Calculate 14 % 7, 6 % 21, and 35 % 9.
Problem 0.2
In the primality() function of section 0.5.4, the loop condition is i < max_divisor+1. Explain why changing it to i < max_divisor causes primality() to mistakenly identify 121 as a prime number.
Problem 0.3
Write a C program that meets the following requirements:
It includes a function
int factorial(int n);The function
factorial()should compute the factorial ofn.It has a
main()function that tests thefactorial()with inputs of 0, 1, and 8.It prints the computed factorials.