a. The two programs perform the same function. Describe it. b. Which version performs better, and why

Answers

Answer 1

Programs are series of instructions interpreted by a computer

The description of the program is to compute the square of the difference between corresponding elements of two arraysThe better version of the program is program A.

How to describe the programs

From the programs, we have the following highlights

The program iterates from 1 to n - 1The iteration calculates the difference between corresponding elements of the arraysThe difference is then squared

Hence, the description of the program is to compute the square of the difference between corresponding elements of two arrays

The better version

The better version of the program is program A.

This is so, because the program uses fewer instructions for the same task as program B

Read more about programs at:

https://brainly.com/question/16397886


Related Questions

Type the correct answer in the box.
What is the output of the formula
=NOT(12+12=24)?“
The output of the formula =NOT(12+12=24) is

Answers

Answer:

(24=24)

.............

Discuss operator precedence in C programming with examples ​

Answers

Answer:

See picture for the operator precedence.

A very common pitfall is the << (shift) operator.

It has lower precedence than, for instance, the + operator, so a statement like:

int a = 3;

int c = a << 2 + 1;

will produce a different result than:

int c = (a << 2) + 1;

The first will evaluate to c = a<<3.

Anyone know why my desktop won’t turn on, I upgraded my ram and my monitor won’t turn on

Answers

Answer:

RAM Slots

Explanation:

RAM is most probably in the wrong slots.

Check BIOS

Check with Motherboard User Manual.

________ are created by combining and customizing components from different online software applications.

Answers

Answer:

Mashup are created by combining and customizing components form different online software applications.

In computer science, what does it mean to interface?
A. To know the history of computing and computer science
B. To be able to personally show others how to use a computer
C. To know how to use materials and tools to build a computer
D. To communicate with a computer through a device or program

Answers

D, To communicate with a computer through a device or program :)

Explain how interactions between characters develop one of the themes in Cheboygan Day? Explain

Answers

The Cheboygan Daily Tribune is a daily newspaper published Tuesdays through Saturdays in Cheboygan, Michigan, United States. It is owned by Gannett. In addition to the daily newspaper, Gannett also publishes the Shopper's Fair pennysaver and Mackinac Journal, the "magazine of the straits".

How to add text on picture? Write the steps.​

Answers

Answer:

Here r ur steps :-

Explanation:

Download any editing application from Play Store.( nowadays these features come pre installed in ur gallery )

Then open it and tap on add text option.

And then add ur text.

Hope it helps .

Stay safe, stay healthy and blessed.

Have a great day !

Thank you

Basically you just go on the insert tab, in the text group, click text box, drag to draw a text box anywhere near the picture, and then type your text. to change the font or style of the text, highlight the text, right-click it, and then select the text formatting you want on the shortcut menu.


hopefully that helped.

what is font formatting ?​

Answers

Answer:

Font formatting. FONT FORMATTING. When your document comprises pages and pages of plain text, it can be very hard for your reader to find the important ideas buried in the page. You can improve the appearance and readability of your document by changing the appearance of the text – this is known as formatting.

the example of flash drive?​

Answers

Answer:

A data storage device

Explanation:

A data storage device that uses flash memory. ... The definition of a flash drive is a small, rewriteable data storage device that connects to a computer with a USB port. An example of a flash drive is a small memory stick that is kept on a keychain.

If I went to universals during Gradventure would I be able to use an express pass

Answers

Even though its a school trip I think it would be allowed since its your money i mean they cant really deny it

Also are you going this year or next year? I am too!

Answer:

I believe it would still be honored

Explanation:

I don't see anywhere where it states that you cannot use it

I. Direction: Write TRUE if the statement shows Principles of Facility Planning, and FALSE if
the statement is not.
1. An ideal facility building should serve in achieving the long-term goals of the
organization.
2. An ideal facility building should be unsustainable in long run.
3. A hotel lobby is difficult and cheap to maintain.
4. An ideal facility building should fulfill the needs of the intended user.
5. An ideal facility building should be in harmony with local community & law of the
land.

Answers

The following are either true or false in respect of Principles of Facility Planning/Management.

No.  1 is True. No. 2 is False. No. 3 is False. No. 4 is True. No. 5 is True.

What are the Principles of Facility Planning?

The main principles of facility planning are given below:

The planner must coordinate the plans with other government agencies that provide facilities look at other options before selecting the final location for the facilitygive adequate justification for the proposed facilitydevelop a management plan that includes design priorities and operational strategiesuse the Life-Cycle Cost principles while designing ensure that it is in line with the organisations plans/goals etc

Please see the link below for more about Facility Management:

https://brainly.com/question/5047968

Hyperactive Media Sales needs to provide a remote access solution for its traveling salespeople. They have a server running Windows Server 2012 R2 that can be configured as a remote access server for VPN connectivity. You have been reviewing the VPN protocols that are available and need to decide on the best protocol. The traveling salespeople often stay in hotels, so firewall compatibility is a serious concern. Which VPN protocol has the best compatibility with firewalls? Why?

Answers

Answer:

because is a serious concern

Select the correct answer.
What is the advantage of using external JS and CSS files?

Answers

Answer:

B

Explanation:

Ingredient Adjuster
A cookie recipe calls for the following ingredients:
1.5 cups of sugar
1 cup of butter
2.75 cups of flour
The recipe produces 48 cookies with these amounts of the ingredients. Design a pro- gram that asks the user how many cookies he or she wants to make, and then displays the number of cups of each ingredient needed for the specified number of cookies.

Answers

Answer:

#include <iostream>

using namespace std;

int main(){

float cookies=0;

float sugar=1.5;

float butter=1;

float flour=2.75;

cout<<"how many cookies do you want: "<<endl;

cin>>cookies;

float num = cookies/48;

cout<<num<<endl;

cout<< "to make " << cookies<<"cookies you need: "<<endl;

cout<<"sugar cups: "<<num*sugar<<endl;

cout<<"butter cups: "<<num*butter<<endl;

cout<<"flour cups: "<<num*flour<<endl;

return 0;

}

6.9 How is it possible for one computer with a low MIPS rating to have a better performance in practice than a computer with a high MIPS rating

Answers

The performance of systems differs. Computers with low MIPS rating to better performance then high MIPS rating  is explained below:

What is the The performance of a system about?

The Millions Instructions per Seconds (MIPS) is said to give the accurate measurements for the speed and work output of computer systems.

One computer with a low MIPS rating  often supports register-to-register operations but computer with a high MIPS rating that is complex set of instruction supports memory-to-memory operations.

Though the two systems can be similar in terms of hardware, Instruction Set Architecture (ISA) and software, the MIPS rating often differs

The performance of a system can be measured based on the amount of the time taken to perform a task and so therefore, the lower the MIPs, the   better performance in practice.

The MIPS is seen as not a good factor to show the performance of a system because not all instructions does the same amount of computation.

Example is When there is a type A processor that is known to have a MIPS rating of 1,000 (high MIPS rating ), and a type B processor that also have an MIPS rating of 500 ( low MIPS rating ).

The type A processor do appears twice as fast as the type B processor but the low MIPS rating option will operating at only half the number of MIPS and as such is faster than high MIPS rating.

Learn more about computer from

https://brainly.com/question/24540334

computer network reduce the cost true or false​

Answers

True... computer network reduces cost

Using the data for the JC Consulting database shown in Figure 2-1, identify the one-to-many relationships as well as the primary key fields and foreign key fields for each of the five tables.

Answers

The JC consulting database is a structure used to store organized information of JC consulting

How to identify the relationship

From the figure, we can see that the cardinality of the project table and the client table is 1 : many.

Similarly, the cardinality of the project table and the ProjectLifeItems is 1 : many.

Hence, the one-to-many relationships are Project & Clients and Project & ProjectLifeItems

How to identify the primary key

This is the key on the first table (i.e. the client table)

Hence, the primary key field is ClientID

How to identify the foreign keys

These are the fields that correspond to the primary key on the client table

The fields that correspond to ClientID are ProjectID, EmployeeID, TaskID and ProjectLifeItemsID

Hence, the foreign keys are ClientID are ProjectID, EmployeeID, TaskID and ProjectLifeItemsID

Read more about database at:

https://brainly.com/question/24223730

if you write a Python command to find the result of: . 1340+1242-43*4
(123-12)*12+14 .
-12*(16/2)+ 13*2​

Answers

Very easy

Program:-

[tex]\tt R1=1340+1242-43*4[/tex]

[tex]\tt R2=(123-12)*12+14[/tex]

[tex]\tt R3=-12*(16/2)+13*2[/tex]

[tex]\tt print(R1,R2,R3)[/tex]

Question 4 of 10
Which computer discipline involves designing technologies such as
smartphone apps and the operating systems that run computers?
A. Information technology
B. Software engineering
C. Information systems
D. Computer engineering
SUBMIT

Answers

Answer:

B. Software engineering

Answer:

B. Software engineering

Explanation:

Chad, a computer programming student, just finished writing a computer program. In order to check whether the program performs the intended task, Chad must convert the source code to an program. Which tool would Chad need for this purpose?

Answers

Answer:

A compiler, Brainiest please

lets do something new​

Answers

Do I hav to subscribe ?

Stay safe, stay healthy and blessed.

Have a great day !

Thank you

i'll subscribe if you will say :-)

A conditional expression is also known as what?
a) Switch Statement
b) Alternative to if-else
c) If-then-else statement
d) Immediate if​

Answers

Answer:

An if-then-else statement

Explanation:

Answer:
C
Conditionssss

An international fast-food chain is looking for opportunities to leverage the Cloud to gain insights into customer data, including location, and order patterns. The client has engaged Accenture to help create customer-focused experiences, including promotions.

They need Accenture's help with this campaign and to create a unique user experience for all their customers.

Which technology, when partnered with Cloud, would allow this to occur?

Answers

Answer:

Artificial Intelligence

Explanation:

The technology that when partnered with the cloud would allow this to happen is Artificial Intelligence and Machine learning. Artificial intelligence (AI) is an era that allows a device to act like a person.

define throway protype with examples

Answers

Explanation:

A paper prototype is an example of a throwaway prototype created in the form of rough or hand-sketched drawings of the product's interface, front-end design, and sometimes the back end work.

The web is based on the ____ Protocol?

Answers

Answer:

blank

Explanation:

that question answer is the web is based on the blank protocol

Answer:

The web is based on the HTTP protocol

What is the data flow?​

Answers

Answer:

A data flow is a way of representing a flow of data through a process or a system

Let cell E2 = 100, what is the result of this formula? =NOT(E2<100) *

Answers

Answer:

True

Explanation:

Consider the following code segment.

int[] arr = {1, 2, 3, 4, 5, 6, 7};
for (int i = 1; i < arr.length; i += 2) {
arr[i] arr[i - 1];
}

Required:
What represents the contents of the array arr after the code segment is executed?

Answers

The contents of the array "arr" after the code segment is executed is [1, 1, 3, 3, 5, 5, 7].

What is an array?

An array can be defined as a set of memory locations or data structure on a computer system that comprises a single item of data with each memory location sharing the same name.

This ultimately implies that, the data (elements) contained in an array are all of the same data type such as:

StringsIntegers

From the source code, the array's length is equal to 7. Also, the first iteration of the loop (i = 1) produces the second index of the array and its elements are updated with the previous value.

In conclusion, the contents of the array "arr" after the code segment is executed is [1, 1, 3, 3, 5, 5, 7].

Read more on array here: https://brainly.com/question/19634243

Which of the following is the first step considered while creating a chart?
a. Determine the chart layout.
b. Determine the title for the chart.
c. Determine the goal for the chart.
d. Decide the chart type.

Answers

Determine the chart layout

Map-reduce Java code for Matrix Multiplication. It should be unique not copied from Internet

Answers

Answer:

that is an example of matrix

Other Questions
The first step of proving cash is toA. calculate the checkbook balanceB. reconcile a bank statementC. record the bank reconciliationD. calculate the cash balance Pls help (giving brainliest to first answer) What is 2x + 3y + 5 = 0 in the form of y = mx + c? please kindly explain in detail. Find the location of Boston as an ordered pair what is7 less than the product of 30 and a number r Business A charter bus service charges a $125 transportation fee plus$8.50 per passenger. This is represented by the function c = 8.5p + 125,where c is the total cost based on p passengers. What is the total cost oftransportation for the following numbers of passengers: 50, 100, 150, 200,and 250?Life Science Tyrannosaurus rer was one of the largestnon Which is an example of as-xual reproduction by cloning?A: an amoeba divides into two new cellsB: a sheep is born as an identical copy of its parent through a laboratory process.C: a harebell plant sends stolons underground. D: a severed starfish arm develops into a new starfish A robot can complete 7 tasks in 23 hour. Each task takes the same amount of time.a. How long does it take the robot to complete one task?b. How many tasks can the robot complete in one hour? Approximately how many millionyears ago (mya) were all of Africa andSouth America inferred to be locatedsouth of the equator which structures are adapted for supporting a plant?a) Phloem tissues b) Root hair cellsc) Stomatad) Xylem vessels A figure shows a triangle drawn inside a square. The area of the triangle is 40 cm, and the area of the square is 64 cm. A point on the figure is randomly selected, and its location is recorded.After 150 trials, the randomly selected point was in the triangle 105 times.How does the experimental probability of a randomly selected point being in the triangle compare to the theoretical probability of the event?The experimental probability of the event is Choose... and the theoretical probability of the event is Choose.... Therefore, the experimental probability is Choose... the theoretical probability. Celia has some cakes.2/3 of the cakes are chocolate cake and 6/7 of the remaining cakes are cheesecakes. The rest of the cakes are carrot cakes.What fraction of the cakes are carrot cakes?Leave your answer as a fraction in the simplest form. please help ASAPPPP SOMEONE :( Read the sentence.Lisa presented her report to the class.Which word is the antecedent in the sentence?reportLisaclassher What is the difference between growing old and growing up? When a speaker makes an implied comparison, she or he is using the figurative language known as _____. What is the momentum of a golf ball with a mass of 62 g moving at 73 m/s? Help me pls 1. In a two-digit number, the sun of the two digits is 10. If the two digits are reversed, the original number is less than the new number by 36. Find the original number.2. In a two-digit number, twice the tens digit is less than the units digit by 3. If the two digits are reversed, the new number is greater than twice the original number by 18. Find the original number place the events in chronological order that correctly shows the cause and effect of how the human Missile Crisis started an escalated ill give most brainliest please just someone help Kennedy carries out the Bay of Pigs invasion. An American military plane discovers sites capable of launching missiles in Cuba. Kennedy issues an ultimatum demanding the removal of missiles from Cuba.Krushchev and Castro plan to place Soviet missiles in Cuba for defense. 1place the events in chronological order that correctly shows the cause and effect of how the human Missile Crisis started an escalated A tennis court is divided into rectangular sections. The doubles alleys are the areas on either side of the court used for double games. The rest of the court is the singles court. Each service box is identical in shape and has a perimeter of 69 feet. Find the area and perimeter of the indicated regions. Write your answers as mixed numbers, if necessary