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
aniked [119]
2 years ago
11

Myvar = 0;

Computers and Technology
1 answer:
Ber [7]2 years ago
8 0

Answer:

#part (a):

Here Module(a,b) refers to modulo function.

It calculate remainder when

"a" is divided by "b".it will return 0, if a number

is completely divided by another number, otherwise

it will return the remainder.

In for loop , first iteration

myvar = myvar+Module(i,2)*i

myvar = 0+Module(1,2)*1         (i=1,myvar=0)

myvar = 0+1*1                

myvar=1

Then the value of "myvar=1" after the first iteration.

In for loop , second iteration

myvar = myvar+Module(i,2)*i

myvar = 1+Module(2,2)*2         (i=2,myvar=1)

myvar = 1+0*2                

myvar=1

Similarly it will iterate 30 times,

and at the end of for loop "myvar" will become 225.

which is equal to square of 15.

The above algorithm calculate the square of (i/2) if it odd otherwise

value of "myvar" doesn't change.

#part (b):

Here for loop runs for 30 times, so the complexity will be O(1) because

30 is a scaler number.

#part (c):

There is a function "square(n)"which gives the equivalent value of "myvar".

i.e

myvar=square(i/2).

You might be interested in
Use a VLOOKUP function in cell I5 to identify and calculate the federal withholding tax. Use the tax rates from the range D21:E2
SVEN [57.7K]
In the Cell 'H13' of Sheet 'Payroll Data', the 'Formula' was not set to 'G13-B13*$B$24'.
6 0
3 years ago
What is the benefit of using a creative commons license?
alukav5142 [94]
It makes things easier for creative people 
3 0
3 years ago
Which of the following is the path to the zoom button? select one:
kupik [55]
The correct answer is a. (view tab | zoom group).
8 0
3 years ago
Read 2 more answers
The phrase ____ refers to an organization of components that define and regulate the collection, storage, management and use of
Burka [1]

Answer:

A. Database Management System

Explanation:

A Database Management System or DBMS is a set of programs that allow the DB administrator to the information extraction, storage and modification out of a database. It also provides tools to add, erase, modify or even analyze the data within the DB. Some examples of DBMS are MySQL, mongo DB, Ms SQL Server, etc.

3 0
3 years ago
What type of software can you run to help fix computer problems?
GarryVolchara [31]

Answer:

IOBit Driver Booster.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Order the steps to take when drawing electron dot diagrams.
    15·2 answers
  • You type a web address in your web browser. order the steps, which describe the internet name resolution process for the web add
    7·1 answer
  • Which of the following focuses on information related to disease identification, control, and prevention?
    10·1 answer
  • A technician is assigned a task to configure a new server with six hard drives. The senior administrator requested the technicia
    13·1 answer
  • $8.25/hour; _____$/year, when working 40 hours a week.
    6·1 answer
  • Google Ads was constructed around three core principles, focused on helping businesses reach their online potential. The first o
    7·1 answer
  • File
    10·1 answer
  • Give an example where traditional laws and modern media have created "grey areas".
    6·1 answer
  • Why do relational databases use primary keys and foreign keys?.
    12·1 answer
  • Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the absolut
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!