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]
2 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]2 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
1000base-t is a standard for achieving throughputs ____ times faster than fast ethernet over copper cable.
meriva
An Average of 10 times faster.

Hope this helps!
3 0
3 years ago
Jorge is looking for information about the life of his favorite music artist, Ray Charles. Which type of resource(s) would provi
Bumek [7]
He could read a biography.
4 0
2 years ago
Write a function DrivingCost with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar co
jolli1 [7]

Answer:

the brainly thing is saying that i can't put the answer so i screenshotted it and put it down below

Explanation:

4 0
1 year ago
Given a integer, convert to String, using String Builder class. No error checking needed on input integer, However do read in th
Gennadij [26K]

Answer:

The program in Java will be:

// Java program to demonstrate working parseInt()  

public class GFG  

{  

   public static void main(String args[])  

   {  

       int decimalExample = Integer.parseInt("20");  

       int signedPositiveExample = Integer.parseInt("+20");  

       int signedNegativeExample = Integer.parseInt("-20");  

       int radixExample = Integer.parseInt("20",16);  

       int stringExample = Integer.parseInt("geeks",29);  

 

       // Uncomment the following code to check  

       // NumberFormatException  

 

       //   String invalidArguments = "";  

       //   int emptyString = Integer.parseInt(invalidArguments);  

       //   int outOfRangeOfInteger = Integer.parseInt("geeksforgeeks",29);  

       //   int domainOfNumberSystem = Integer.parseInt("geeks",28);  

 

       System.out.println(decimalExample);  

       System.out.println(signedPositiveExample);  

       System.out.println(signedNegativeExample);  

       System.out.println(radixExample);  

       System.out.println(stringExample);  

   }  

}

7 0
3 years ago
Which method of deleting files can be used in windows xp and vista?
Makovka662 [10]
The correct answer is C.

4 0
2 years ago
Other questions:
  • How are the internet and the World Wide Web different from each other
    14·1 answer
  • 4. True or False? Electrons flow out from the POSITIVE end of a battery. *<br> True<br> False
    7·1 answer
  • You’re responding to a troubleshooting ticket about a laser printer in HR that isn’t working. According to reports, the printer
    7·1 answer
  • Write a program that implement a bubble sort ?
    5·1 answer
  • Controlling the physical world with sensors and digital devices depends on bandwidth and the ability to analyze data in real tim
    5·1 answer
  • Sequence encryption is a series of encryptions and decryptions between a number of systems, wherein each system in a network dec
    9·1 answer
  • Assume that you have created a class named DemoCar. Within the Main() method of this class, you instantiate a Car object named m
    12·1 answer
  • Which of the following is NOT one of the Big 3 Google Applications that we discussed?
    9·2 answers
  • A digital designer might do computer animations for video games,<br> OA<br> True<br> OB<br> False
    12·2 answers
  • If each integer occupies one 64-bit memory cell and is stored using sign/magnitude notation, what are the largest (in terms of a
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!