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
devlian [24]
3 years ago
8

The iteration variable begins counting with which number? O 0 O 1 O 10 O 0 or 1

Computers and Technology
1 answer:
bonufazy [111]3 years ago
7 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The iteration variable begins counting with 0 or 1.

As you know the iteration mostly done in the looping. For example, for loop and foreach loop and while loop, etc.

It depends upon you that from where you can begin the counting. You can begin counting either from zero or from one.

For example: this program counts 0 to 9.

<em>int total=0;</em>

<em>for(int i=0; i>10;i++)</em>

<em>{</em>

<em>total = total+i;</em>

<em>}</em>

Let's suppose, if you want to begin counting from 1, then the loop should look like below:

<em>int total=0;</em>

<em>for(int i=1; i>10;i++)</em>

<em>{</em>

<em>total = total+i;</em>

<em>}</em>

You might be interested in
Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, a
kkurt [141]

Answer:

(a) Calculate the average CPI for each machine, M1, and M2

Average CPI = Cycles per Instruction * Frequency of each  Instruction

                     = CPI * F

For Machine M1:

Cycles per Instruction/ Clocks per Instruction =  (60%)* 1 + (30%)*2 + (10%)*4

                                                                        = (0.60) * 1 + (0.30) * 2 + (0.10) * 4

                                                                          = 0.6 + 0.6 + 0.4

                                                                          = 1.6

For Machine M2:

Cycles per Instruction/ Clocks per Instruction=  (60%)*2 + (30%)*3 + (10%)*4

                                                                         = (0.60) *2 + (0.30) * 3 + (0.10) *4        

                                                                         = 1.2 + 0.9 + 0.4

                                                                          = 2.5

(b) Calculate the average MIPS ratings for each machine, M1 and M2.

MIPS rating can be found by using this formula

MIPS rating = Instruction Count / Execution Time * 10^6

                   = Instruction count  / IC X CPI * Clock cycle time * 10^6

                   = IC X Clock rate  / IC X CPI X 10^6

                   = Clock Rate/(CPI * 10^6)

MIPS rating for Machine M1:

The clock rate for M1 is 80 MHz and CPI calculated in (a) is 1.6 So:

MIPS rating = (80 * 10^6) / (1.6 * 10^6 )

                   =  80000000/ 1600000

                   =  50

MIPS rating for Machine M2:

The clock rate for M1 is 100 MHz and CPI calculated in (a) is 2.5 So:

MIPS rating = (100 * 10^6 ) / (2.5 * 10^6 )

                   =  100000000 / 2500000

                  =  40

(c) Which machine has a smaller MIPS rating?

  • M2 has a smaller MIPS rating which is 40.

Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating.

Machine M1 has the higher MIPS rating than M2 and in order to make M2 perform better than M1, the CPI of instruction class A should be modified. Lets change the instruction class A CPI to 1 in place of 2.

Then:

Cycles per Instruction/ Clocks per Instruction= (60%)*1 + (30%)*3 + (10%)*4

                                                                       = (0.60 * 1) + (0.30 * 3) + (0.10 * 4)

                                                                       = 0.60 + 0.9 + 0.4

                                                                       = 1.9

Average MIPS rating = (100 * 10^6) / (1.9 * 10^6 )

                                   = 100000000 / 1900000

                                   =  52.6

Average MIPS rating is of M2 after changing instruction class A CPI is 52.6 which is better than the average MIPS rating of M1 which is 50.0

4 0
3 years ago
All nuclear energy results in the rapid release of energy, such as in atomic bombs. true or false
marishachu [46]
False because some nuclear radiation is slow
5 0
3 years ago
In a large kitchen what is meant by the partie system? Who devised this system?
denis-greek [22]

Answer:

While at the Savoy in London, Escoffier formally introduced his army-influenced organisational method to the kitchens there. It became known as the Chef de partie system, and the idea was to avoid duplication of tasks, and to make communication between the various staff members easier.

8 0
3 years ago
Explain the importance of mobile computing in communication​
ludmilkaskok [199]
<h3><em><u>Importance of Mobile computing in communication</u></em></h3>

*It’s portable and easy-to-use.

*It helps for different communication and information exchange.

*It saves user’s time and effort.

*It provides quick services like online business, e-mail, e-fax, etc.

*It increases the social interaction by sharing location services and GPS system.

7 0
3 years ago
Read 2 more answers
Assembling parts and using various machines to create a final product is the process of ______.
s2008m [1.1K]

Answer:

Hey bro! Sorry to bother. But have any of your questions got deleted after posting them? I don't know why my question got deleted by a guy.

Explanation:

8 0
4 years ago
Other questions:
  • A collection of methods that can be used by any class, as long as the class provides a definition to override the collection's a
    5·1 answer
  • Name one advantage of modular switches over fixed-configuration switches.
    5·1 answer
  • Discuss two things you want to know about driving
    12·1 answer
  • 11.19 (Constructor Failure) Write a program that shows a constructor passing information about constructor failure to an excepti
    6·1 answer
  • 1. Assume you're using a three-button mouse. To access shortcut menus, you would
    6·2 answers
  • Saved
    5·1 answer
  • I need help with this answer, I will give brainliest as long as there is actually an answer!
    11·1 answer
  • Which of the following statements is FALSE?
    5·1 answer
  • 11.5 Code Practice edhesive
    10·2 answers
  • Could anyone help me with this assignment please?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!