Functions
Exercise 52
Write a function to calculate the price including VAT. This function will receive a Real parameter
named "prixHT" and a second Real parameter named "tva".
Exercise 53
Write a procedure to display whether an integer passed as a parameter is even or odd.
Exercise 54
Write a function to return the number of characters in a string passed as a parameter.
Exercise 55
Write a function to find out how many times a character occurs in a string. The character to be
searched for and the string will be passed as parameters .
Exercise 56
Write a function or procedure that calculates the absolute value of a number.
Exercise 57
Write a procedure to display the multiplication table of a positive integer x.
Exercise 58
Write a function that calculates the PGCD of two strictly positive integers.
Exercise 59
Write a procedure that reads two numbers, calculates their sum and product and displays whether
they are positive or negative.
Exercise 60
Write a procedure that reads a list of integers (N numbers) whose last value = -1
and displays the number of even integers and their percentage of the given number of integers.
Exercise 61
Write a procedure to enter two values M and N and display all even values between M and N if M<N.
Exercise 62
Write a procedure that displays whether a number is prime or not .
Recursive functions
Exercise 63
Write a recursive function to calculate the factorial of an integer entered by the user.
Exercise 64
Write a recursive function to calculate the sum 1+2+3+...+ N. where N is entered by the user.
Exercise 65
Write a recursive function that, given a real number x and a positive integer value n, calculates x to
the nth power.
Exercise 66
Write a recursive function to display integers from 0 to 10 using a single parameter.
Exercise 67
Write a recursive function to display the integers from A to B . Where A and B are parameters of this
function.
Exercise 68
Write a recursive function to calculate the PGCD of two integers passed as parameters,( using Euclid's
algorithm).