Answer:
- sum = 0;
- n = 1;
- f = fibonacci(n);
-
- while f <= 500
- if(mod(f,2)==0)
- sum = sum + f;
- end
- n = n + 1;
- f = fibonacci(n);
- end
-
- disp(sum)
Explanation:
Firstly, let's define several variables which are necessary to hold the value of total of Fibonacci sequence, <em>sum</em>, Fibonacci index,<em> n</em> and Fibonacci term, <em>f</em> (Line 1 - 3). We can get the first Fibonacci term using the Matlab built-in function <em>fibonacci() </em>(Line 3).
Since the Fibonacci term should be less than or equal to 500, create a while condition that meet the requirement (Line 5). Within the while loop, check if the current Fibonacci term is an even number. This can be achieved by using mod() function to calculate the <em>f</em> modulus by 2 (Line 6). If the result is zero, the <em>f</em> is an even number and f value will be added with variable <em>sum</em>.
Next increment the Fibonacci index by 1 and use the same function <em>fibonacci()</em> to get the next Fibonacci term, f, and repeat the same process as described above until the <em>f</em> becomes bigger than 500.
At the end, display the result (Line 13). The result shall be 188.
Answer:
Insert tab
Explanation:
It is the second tab in the Ribbon. As the name suggests, it is used to insert or add extra features in your document. It is commonly used to add tables, pictures, clip art, shapes, page number, etc.
Answer:Key
Explanation:
In cryptography Encryption is the process of encoding the confidential data in such a way that only intended recipient can decode it by decoding it with the help of a suitable key.
Encryption is used in almost every data transmission such that the senders data can only be viewed by receiver without the interference of outsider.
Answer:
Mountain farming
Explanation:
Mountain farming is done in hilly areas of the mountains. It is mainly family farming. The mountain farming is mainly done in the mountains where the paddy fields are scattered and the limited use of the usable lands are available.
It is cultivated in different types of climatic conditions or landscapes with limited use of mechanization or machines. The mountain farming is maintained by the family farms in an effective way.