Hi everyone! I was wondering if any of you want to help me with a computer science problem I have for one of my classes. I do not understand how to do it which is why I ask.

Here is the problem: Write an algorithm for placing a set of pencils in order from largest to smallest (left to right).

I learned other sorting algorithms but I don't quite understand how to implement them into my own algorithm.

Thanks.

Answers

Answer 1

Answer:

Use bubble sorting

Here is an example program I made:

for(int i = 0; i < length; i++){

     for(int j = 0; j < length; j++){

       if(j != length - 1){

         if(input[j] > input[j + 1]){

          storeVar = input[j];

         

          input[j] = input[j+1]; //storeVar2;

         

          input[j+1] = storeVar;

         }

       }

     }


Related Questions

html use for web page deaign true or false​

Answers

PLEASE GIVE BRAINLIST

False

HOPE THIS HELPED

How globalization is related to communication technology?

Answers

Answer:

hey mate there is your answer

What is the greatest common
factor of the following three
numbers?
12, 18, 32​

Answers

Answer: 2

Explanation:

Multiple Choice
Which of the programs below will result in the following output?
Hours
8
85
10
Total
26.5

Answers

Answer:

print("Hours")

print(8)

print(8.5)

print(10)

print("Total")

print(8 + 8.5 + 10)Explanation:

Answer:

A

Explanation:

how many types of fundamental movement are there

Answers

Answer:

12

Explanation:

To create an effective study schedule, a student must guess the amount of time needed for studying. write down all activities and commitments. allow the same amount of time each day for studying. budget periods of time to study daily, even if it is interrupted.

Answers

Answer:

B) write down all activities and commitments

Explanation:

It seems the most logical.

Write down all activities and commitments.

What is Commitments?

An planned schedule describing study periods and learning objectives is called a study plan.

College students should create a calendar that allots specific time each week for studying, much like with work or school schedules. The dates of the quizzes, tests, and exams should be included in this plan, as well as the due dates for the papers and projects.

It can be hard to manage your time. You most certainly have obligations outside of school, such as work, extracurricular activities, and social events.

Therefore, Write down all activities and commitments.

To learn more about commitments, refer to the link:

https://brainly.com/question/13864456

#SPJ6

Suppose you have one particular application that is trying to send data on the Internet but none of the data is making it to the
destination. Other applications work fine. What might you suspect is happening?
a) The Network connection is broken
b) the network is experiencing latency
c) firewall is blocking that application
d)data loss is occurring due to network congestion

Answers

Answer:

Firewall is blocking that application.

Explanation:

i got it right on the test and i hope yall have a great day :3

Answer:

FIREWALL

Explanation

i did it on edj

Which type of evidence should victims collect to help officials catch cyber bullies

Answers

Answer:

(c)social media usernames

Explanation:

The type of evidence should victims collect to help officials catch cyber bullies is social media usernames.

What do you mean by the cyber bullies?

Cyberbullying is when someone is harassed, threatened, or intimidated through a cell phone, instant messaging app, email, or social networking sites.

Children frequently engage in cyberbullying because they have access to these technologies at an earlier and earlier age.

Cyberbullying victims may have a variety of negative consequences, such as mental health problems, subpar academic results, a desire to quit school, and even self harm thoughts.

Bullies themselves at a higher chance of developing problems like drug abuse and engaging in violence.

Therefore, the  type of evidence should victims collect to help officials catch cyber bullies is social media usernames.

To know more about the cyber bullies, visit:

https://brainly.com/question/4689569

#SPJ2

Which inventor developed a method through which groups of people, instead of just
individuals, could view films at the same time?
Al Jolson
Robert Paul
Edwin S. Porter
Thomas Edison

Answers

Answer:

Thomas Edition is the inventor developed a method through which groups of people instead of just individuals,could view films at the same time.

Hope it will help you

Answer:

B: Robert Paul

Explanation:

edg2021

It is not Thomas Edison. He created the Kinetoscope that allows for individuals to watch, "The British inventor, Robert William Paul, expanded on Edison’s Kinetoscope parlors with his film projector, enabling theaters to display movies for groups instead of individual viewing"


Which character is often used to identify registered trademarks and is available on the Insert tab and Symbols group?

Answers

Answer:"TM"

Explanation:

Answer:

TM

Explanation:

because its used to identify, trademarks and etc. mark brainliest! i also got 100 on the quiz

WILL GIVE BRAINLIEST!!!!!!!!
Trade-offs are the moral principles and values that guide conduct within a group of people.


Group of answer choices


True


False

Answers

yes trueso true true true

Nathan notices his computer System is slowing down when he tries to copy documents to it he also gets a prompt I warned him that the system is running low on storage space which hardware device should he consider upgrading in order to increase the system storage space?

Answers

Answer:Hard drive or Solid State drive

Explanation:

What is network topology​

Answers

Network topology is the arrangement of the elements of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, including command and control radio networks, industrial fieldbusses and computer networks.

I hope it helps!

Answer:

By definition "Network topology is the arrangement of the elements of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, including command and control radio networks, industrial fieldbusses and computer networks."

There are multiple types of network topology that all have different purposes, but they all fall under the same general thing as mentioned above. If you're doing a course about this you'll learn much more in detail about it.. It's way too much to describe here on Brainly so feel free to do some research of your own as well!

Hope this helps and have a nice day!

Which explains extrinsic motivation? motivation in which there is a reward motivation that is personally satisfying motivation that is personally meaningful motivation in which the subject is interesting

Answers

Answer:

Motivation in which there is a reward.

Explanation:

Hope this helps God Bless.

The one that explains extrinsic motivation is motivation in which there is a reward. The correct option is a.

What is extrinsic motivation?

Extrinsic motivation is characterized as an incentive to engage in an activity based on achieving an external goal, winning a competition, gaining acclaim and approval, or receiving a prize or cash.

The extrinsic incentive includes things like getting paid to complete a task. Even though you might prefer to spend your day doing something else, you are motivated to go to work because you need the rewards from your job to pay your bills.

In this case, your ability to pay for your everyday expenses serves as your extrinsic motivation. Such a desire or incentive is intrinsic if the reward is inherent in the job. However, if the reward is said to be unrelated to the position, the motivation is said to be extrinsic.

Therefore, the correct option is a, motivation in which there is a reward.

To learn more about extrinsic motivation, refer to the link:

https://brainly.com/question/1658150

#SPJ6

Which of the following is not an operating system
A.LINUX
B.MAC OS
C.NEXUS
D.WINDOWS

Answers

Answer:

C

Explanation:

I hope this helped.

Answer:

I honestly don’t know... But I’m still gettin that credit Broski

Explanation:

Program code that can be evaluated to a value is called a(n):__________

Answers

Answer:

The answer is "expression"

Explanation:

An expression is a term or phrase, which is commonly used to transmits certain concepts, perceptions as thoughts. It is a mixed form of more than one operands, which is used to determines the values. It is a legal symbol, that combines the representing word like, operators, constants, and variables, that is arranged by language law.  

please find the attachment for example.

A _____ describes two or more computers connected to each other.

computer network

client

server

switch

Answers

Answer:

C

Explanation:

computer network

How do I persuade my parents to allow me to have social media? I will be 15 in a week or so, so I am old enough. I'm pulling my grades up, I help around the house, I am in honors classes, I help my siblings out with school, I help make dinner, I just help a lot. What should I do?

Answers

Answer:

my explanation is above my comment :)

Explanation:

Enhancing personal identity is often a factor in making a career choice

Answers

Yes, they ask for your sex & race on many applications. Depending on the person, you may not get the job depending on the person and their standards. It’s reality.

Which option offers predesigned formatting and design elements to facilitate the process of creating a document?
A.
themes
B.
templates
C.
design
D.
layout

Answers

Answer:

The answer is B, templates

Explanation:

Answer:

B. templates

Explanation:

Which correctly lists the two elements that make up the empty space in the universe? ice and debris debris and dark matter dark matter and dark energy dark energy and dust

Answers

Answer:

The answer is "dark matter and dark energy and dust".

Explanation:

In the empty room, the universe is gases and ashes. Even though humans think the exterior universe's blank space is nothing more than empty.  Fortunately, the plasma form of its hydrogen and helium gases, including the various types of dirt and debris, occupy this void vacuum.  There are also several other materials however these greenhouse gases and dust particles are also the bulk of the material.

Answer:

c

Explanation:

What is the origin of the name “breadboard”?

Answers

Answer:

Originally the word referred to a literal bread board, a polished piece of wood used for slicing bread. In the 1970s the solderless breadboard ( a.k.a. plugboard, a terminal array board) became available and nowadays the term "breadboard" is commonly used to refer to these.


Ethernet network.  Your job is to decode it and answer the below questions. 
SEARCH:  Hex to ASCII converter
Copy the code below and paste into the Hex Code section.
Copy the converted code and paste underneath where it says <Insert>
d4 a9 28 06 f0 43 50 7b 9d e4 db e1 08 00 45 00
03 2f 4b 9d 40 00 80 06 62 cc c0 a8 01 bb 83 f7
03 05 de 92 00 50 62 72 96 9e c8 61 7b 5f 50 18
01 00 c9 cf 00 00 47 45 54 20 2f 7e 6b 63 68 72
69 73 74 65 2f 63 68 72 69 73 74 65 6e 2e 68 74
6d 6c 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73
74 3a 20 77 77 77 2e 63 73 65 65 2e 75 73 66 2e
65 64 75 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a
20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 43 61 63
68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6d 61 78 2d
61 67 65 3d 30 0d 0a 55 70 67 72 61 64 65 2d 49
6e 73 65 63 75 72 65 2d 52 65 71 75 65 73 74 73
3a 20 31 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a
20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 57 69 
6e 64 6f 77 73 20 4e 54 20 31 30 2e 30 3b 20 57
69 6e 36 34 3b 20 78 36 34 29 20 41 70 70 6c 65
57 65 62 4b 69 74 2f 35 33 37 2e 33 36 20 28 4b
48 54 4d 4c 2c 20 6c 69 6b 65 20 47 65 63 6b 6f
29 20 43 68 72 6f 6d 65 2f 36 38 2e 30 2e 33 34
34 30 2e 31 30 36 20 53 61 66 61 72 69 2f 35 33
37 2e 33 36 0d 0a 41 63 63 65 70 74 3a 20 74 65
78 74 2f 68 74 6d 6c 2c 61 70 70 6c 69 63 61 74
69 6f 6e 2f 78 68 74 6d 6c 2b 78 6d 6c 2c 61 70

70 6c 69 63 61 74 69 6f 6e 2f 78 6d 6c 3b 71 3d
30 2e 39 2c 69 6d 61 67 65 2f 77 65 62 70 2c 69
6d 61 67 65 2f 61 70 6e 67 2c 2a 2f 2a 3b 71 3d
30 2e 38 0d 0a 41 63 63 65 70 74 2d 45 6e 63 6f
64 69 6e 67 3a 20 67 7a 69 70 2c 20 64 65 66 6c
61 74 65 0d 0a 41 63 63 65 70 74 2d 4c 61 6e 67
75 61 67 65 3a 20 65 6e 2d 55 53 2c 65 6e 3b 71
3d 30 2e 39 0d 0a 43 6f 6f 6b 69 65 3a 20 5f 5f
75 74 6d 61 3d 31 31 38 36 31 39 32 37 37 2e 31
37 34 32 37 37 36 38 33 30 2e 31 35 33 34 36 34
34 39 36 33 2e 31 35 33 34 36 34 34 39 36 33 2e
31 35 33 34 36 38 38 34 35 35 2e 32 3b 20 5f 5f
75 74 6d 7a 3d 31 31 38 36 31 39 32 37 37 2e 31
35 33 34 36 38 38 34 35 35 2e 32 2e 32 2e 75 74
6d 63 73 72 3d 63 73 65 65 2e 75 73 66 2e 65 64
75 7c 75 74 6d 63 63 6e 3d 28 72 65 66 65 72 72
61 6c 29 7c 75 74 6d 63 6d 64 3d 72 65 66 65 72
72 61 6c 7c 75 74 6d 63 63 74 3d 2f 7e 6b 63 68
72 69 73 74 65 2f 63 68 72 69 73 74 65 6e 2e 68
74 6d 6c 3b 20 5f 5f 75 74 6d 74 3d 31 3b 20 5f
5f 75 74 6d 74 5f 61 63 63 6f 75 6e 74 32 3d 31
3b 20 5f 5f 75 74 6d 62 3d 31 31 38 36 31 39 32
37 37 2e 34 2e 31 30 2e 31 35 33 34 36 38 38 34
35 35 0d 0a 49 66 2d 4e 6f 6e 65 2d 4d 61 74 63
68 3a 20 22 31 37 61 39 2d 35 37 33 35 34 61 35
33 39 30 31 33 65 22 0d 0a 49 66 2d 4d 6f 64 69
66 69 65 64 2d 53 69 6e 63 65 3a 20 4d 6f 6e 2c
20 31 33 20 41 75 67 20 32 30 31 38 20 31 37 3a
34 34 3a 32 39 20 47 4d 54 0d 0a 0d 0a 

<INSERT>
a) What is the Ethernet destination and source address (in hex)? 
b) Identify the vendor of the equipment of the source?
c) What is the protocol type (in the Ethernet header)? 
d) What version of IP is this? 
e) What are the IP destination and source addresses (give in proper dotted decimal notation)? 
f) Identify if the transport protocol is TCP or UDP.
g) What are the transport protocol destination and source port numbers (in decimal)? 
h) What is the application protocol (be sure to give the version number)? 
i) What is the function being performed at the application layer (that is, what is the purpose of
this packet)? 
j) What are the checksum values for all protocols that have a checksum in this packet? Note
that a CRC is not a checksum.

Answers

ang gulo po pede po ba pa picture thank you po.

what is the full form of flops​

Answers

Answer:

Floating Point Operations Per Second (FLOPS)

Explanation:

Floating Point Operations Per Second (FLOPS) is a measure of a computer’s performance, especially in fields of scientific calculations that make heavy use of floating-point calculations. Floating-point operations include any operations that involve fractional numbers.

Answer:

Floating Point Operations Per Second

24. A key on a keyboard of a computer
has two symbols on it, top and down.
Which of the following procedures will be
appropriate to use to get the top key?
A. Hold down the Shift key and
press the identified
B. Hold down the Alt key and
press the identified key
C. Hold down the Ctrl key and
press the identified key
D. Hold down the Del key and
press the identified key​

Answers

Answer:

Its A

Explanation:

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

Design a webpage on Artificial Intelligence /Augmented Reality. please help me out with these computer programming

Answers

Answer:

Using HTML, CSS, and Javascript to create the layout, style it, and program the blog's interactivity respectively. Or use Wordpress without codes.

Explanation:

Designing a blog or a website requires certain knowledge or tools. Programmers use tools like HTML, CSS, Javascript, and other front-end libraries and back-end web frameworks. HTML is used to mark-up the web layout, CSS is used to style beautify the page while Javascript is used to make the page interactive.

Other tools like Wordpress requires little or no skill, since the layout of the webpage is drag and drop and other back-end features can be programmed to it.

Which step is done first to replace existing text in a text box?
•Select the text to be replaced.
•Type new text into the text box.
•Click and drag the text to replace.
•Click an area outside the text box.

Answers

The step is done first to replace existing text in a text box is to  Select the text to be replaced.

What is a text box used for?

A text box is known to be a tool or an object that a person can add to their document and it is the one that p[permits one to lets add type text anywhere in one's file.

Note that based on the above, The step is done first to replace existing text in a text box is to  Select the text to be replaced.

Learn more about text box from

https://brainly.com/question/26372855

#SPJ1

Answer:

A. Select the text to be replaced.

Explanation:

hope this helps :)

Fill in the blank with the correct response.
People in STEM careers are considered
thinkers who reach conclusions through sound judgment and reasoning
Save and Exit
Next
What goes in the blank between considered and thinkers

Answers

Answer:

logical

Explanation:

Answer:

logical thinkers

Explanation:

they are logical thinkers because they know whats going on


Wi-fi works by converting data signals into which of the following?

Answers

Answer:

Radio waves

Explanation:

Wi-fi works by converting data signals into radio waves.

What is WI-Fi?

Wi-Fi is a family of network protocols which is wireless based.

Wi-Fi are generally used for local area networking of devices and Internet access. It allows nearby digital devices to exchange data by the help of radio waves.

Hence, Wi-fi works by converting data signals into radio waves.

Learn more about Wi-Fi.

https://brainly.com/question/13267388

#SPJ2

Language: JAVA Can someone please tell me what the problem to my "main" class is?

I included the errors I received when trying to compile as well as the "Student" class which is used to answer the problem.

Here's the expected output:
Bob : 1234
Sue : 5678
Pat : 2468
Then it accepts user input: Chris

Then it outputs the updated objects:
Bob : 1234
Sue : 5678
Pat : 2468
Chris
Bob : 1234
Sue : 5678
Chris : 2468

Answers

Answer:

please find the attachment of the correct code:

Output:

Bob : 1234

sue : 5678

pat : 2468

please enter a name to replace with pat:  

Chris

Bob : 1234

sue : 5678

Chris : 2468

Explanation:

In this code, when we create the class object, that is "stu1, stu2, and stu3" and call the parameterized constructor bypassing the "string and integer" value and print the object value you forget to call the "tostring" method because it is the only method which returns both "string and integer" value.  

Other Questions
IaleesbleaCleedleo in a survey of 23 college students it was found that 17 were taking an english class 10 were taking a math class and 8 were taking both english and math. how many students were talking a math only class? a. 6 b. 14c. 2 d. 4 Mickey walks Pluto 4 miles North to the dog park. Mickey finds beautifulflowers in the park and decides to pick a bouquet. He then walks withPluto 3 miles West to give this new gift to Minnie. Mickey's distance is-1 mile5 miles7 miles12 miles 1. Measuring instruments, such as rulers and graduated cylinders, are often used in experiments to increase the A clarity of the hypothesis B. testability of the hypothesis C. accuracy of the data sample size of the data 5 Sex chromosome disorders are often not recognized until plz help im crying EASY HELP! WILL MARK BRAINLIEST! Humans role and impact in ecosystem? You take your car to an auto repair shop. The charge for repairs is $48 per hour plus the cost of parts. Ifthe car needs new parts that cost $256 and the final bill was $616, then how long did it take to repair thecar? which type of government did the ancient Greek city of Athens have? What is the value of x?34566879 Find PUR, given the following sets:P = {b, d, f, g}Q = {a, b, c, d]R = {c, e, f, g}S = {a, d. g} Des changes Complete these exchanges with y or en and an infinitive in each answer.1. LA MRE Tu vas manger dans ta chambre? cotton production increased.4. Before the invention of the cotton gin, whatdid many American leaders think would happento slavery? Let ABC be a triangle with circumcenter and altitude AN. AO meets BC at M and meets the circle (BOC) again at N.Pis the midpoint of MN.K is the projection of Pon line AH.Prove that the circle (K,KH)is tangent to the circle (BOC). someone help. what is the missing word? x + 4 = 13 simple equations 2. If an eagle is flying at a constant speed, it is accelerating. True orFalse Which of the following was an Immediate didn't affect of the American revolution There are 266 basketball fans who plan to go to a game. How many buses will be needed, given that each bus can hold 31 fans? Division and rounding required of whole numbers. Determine how many Altuves you could travel in a day if you were moving at 45.000 mph all day. Altuve = 1.65 m