1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aliya0001 [1]
3 years ago
15

The counter in a for or while loop can have an explicit increment: for i=m:k:n. This advances the counter i by increment k each

time. In this problem we will evaluate the product of the first 9 even numbers 2·4·6·...·18 in two ways: (a) Write a script file that evaluates the product of the first 9 even numbers using a for loop.(b) Evaluate the product of the first 9 even numbers using a single MATLAB command. Use the MATLAB command prod.
Computers and Technology
1 answer:
Novosadov [1.4K]3 years ago
3 0

Answer:

(b) prod(2:2:18)

Explanation:

(a) Evaluate the product of the first 9 even numbers:

answer = 1;

for even = 2:2:18

    answer = answer*even;

disp(answer)

(b) Evaluate the product of the first 9 even numbers using MATLAB prod() function

answer = prod(2:2:18)

disp(answer)

You might be interested in
Of the key reasons for creating organizational units which of the following is not one of them?
victus00 [196]
There are no answrt choices it would be very helpful if you added them, then I could help you.
5 0
3 years ago
Write a programme to find the sum of first three cube number?
aleksandrvk [35]

// Simple Java program to find sum of series

// with cubes of first n natural numbers

import java.util.*;

import java.lang.*;

class GFG {

/* Returns the sum of series */

public static int sumOfSeries(int n)

{

int sum = 0;

for (int x = 1; x <= n; x++)

sum += x * x * x;

return sum;

}

// Driver Function

public static void main(String[] args)

{

int n = 5;

System.out.println(sumOfSeries(n));

}

}

// Code Contributed by Mohit Gupta_OMG <(0_o)>

7 0
3 years ago
What does Stand for in web design
myrzilka [38]

Answer:

g

Explanation:

h

7 0
3 years ago
In designing a database, a database administrator should consider..
AfilCa [17]
He must consider all of these because the database is the foundation and you Will come to a lot of problems later on in the road if the foundation is faulty
8 0
2 years ago
Read 2 more answers
Suppose you want to delete an existing file from within word. What would you do?
Oksana_A [137]
Go in to ur files and find the file and delete it
5 0
3 years ago
Other questions:
  • Does anybody know how to use these showers?
    11·2 answers
  • If a user has just added a simple triangle shape into a diagram, how can the triangle be adjusted? Check all that apply. by maki
    6·2 answers
  • The Circle of Growth
    10·1 answer
  • Who distributes IP Address?
    10·1 answer
  • Marla wants to transfer photos from her digital camera to her computer. She has plugged the camera's cord into the USB port. Wha
    11·2 answers
  • Which one my guys I need help
    7·1 answer
  • What would be the best tool to display the following information from a basketball game?
    6·1 answer
  • Which of these is NOT a usual result of having friends at work?
    8·1 answer
  • What is the main difference between a peripheral device and other types of devices? Choose the best answer.
    12·1 answer
  • What did Bakers wear (1) in the Portugal does (2) when was author was young ???
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!