Answer:
see explaination
Explanation:
MATLAB script:
% MATLAB script that calculates reciprocal Fibonacci constant Ψ
% Initial Values
a0 = 1;
a1 = 1;
% Looping variable
i = 2;
% Reading n value from user
n = input(' Enter n value: ');
% Initializing sum
sum = (1/a0) + (1/a1);
% Loop till i reaches n value
while i <= n
% Finding term in Fibnocii series
a2 = a0 + a1;
% Accumulating Sum
sum = sum + (1/a2);
% Updating previous terms
a0 = a1;
a1 = a2;
% Incrementing loop variable
i = i + 1;
endwhile
% Printing result
printf("\n Reciprocol Fibnocii Constant: %f \n", sum);
See attachment for sample output
Answer:
The answer is action eventlistener
Explanation:
It is an event handler and it is easy to implement.In java we call them even listeners it is function or a sub routine or a procedure that waits for an event to occur and respond to an event from a GUI component.