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
ICF is a type of fusion energy research that attempts to initiate a nuclear fusion reaction by heating and compressing a fuel target. Its normally in the form of a pellet that most often contains a mix of deuterium and tritium.
A nuclear reactor is a device used to initiate and control a sustained nuclear reaction. Nuclear reactors are used at nuclear power plants for electricity generation.
Compare: they are both nuclear, they both produce energy, they both are used at power plants.
Contrast: ICF uses fusion, while a nuclear reactor is used to control a sustained nuclear reaction.
This is all I can help with. By the way, are you in rocket science? 'Cause this stuff is hard.
Answer and Explanation:
Using javascript:
function dayof_theweek(){
var TodayDate = window. prompt("enter today's date in the format 'year, month, day' ");
var Datenow=new date(TodayDate);
var Dayofweek=Datenow.getday();
var Days=["monday","Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
if(Dayofweek==indexOf(Days[Dayofweek]))
{
document.createTextnode(Days[Dayofweek]);
}
}
The program above uses a date object which uses the method getday to get the day of the week(get day returns an integer from 0 to 6).we then use a comparison operator == to test the condition that returned value Dayoftheweek is same with the index of the array Days and then print to a html document. The program may need improvements such as the fact that errors may arise when proper input isn't given, and therefore must be handled.