Strategy 1
*Testing for timing, high reliability and performance.
Reasons.
Every device and system configuration must be tested including the software setup,definitions and rules must be tested with an attempt to force the system and its intergrals to fail. Every failure(if there are any) must be evaluated and errors corrected.
Strategy 2
*Measuring response levels at the lowest set point of the alarm.
Reasons.
This is to check the trigger points of the alarms in the system and the response must be recorded as well as changing the intervals of alarm triggers so as to evaluate the time taken for the alarm to respond at the lowest point of it to be triggered.
Answer:
#include <stdio.h>
int fib(int n) {
if (n <= 0) {
return 0;
}
if (n <= 2) {
return 1;
}
return fib(n-1) + fib(n-2);
}
int main(void) {
for(int nr=0; nr<=20; nr++)
printf("Fibonacci %d is %d\n", nr, fib(nr) );
return 0;
}
Explanation:
The code is a literal translation of the definition using a recursive function.
The recursive function is not per se a very efficient one.