Answer:
There is only one modification in the above loop i.e. while loop should be like this--
while (i != n)
{
sum+=arr[i]; // Line 1, In question segment it is line 2.
i++; // Line 2, In question segment it is line 1.
}
Output:
Now if the array input is 1,2,3,4,5 then the output is 15.
Explanation:
In the above question, all the line of the segment is right except the body of the loop because--
- The First line of the loop is increment statement which increments the value of "i" variable from 1 and the value of "i" variable will be 1 in the first iteration of the loop
- The second line starts to add the value from 1'st index position of the array. Hence the segment gives the wrong answer. It adds the arr[1] to arr[n-1].
- So I interchanged both lines of the while loop as shown in the answer part. I make the line 1 (In question segment) as line 2(In answer part) and line 2 (In question segment) as line 1 (In answer part).
Now It gives the correct output because it can add arr[0] to arr[n-1].
Answer:
<h2>YEET B </h2>
Explanation:
Sorry
Its B: a type of what-if analysis that allows a user to define multiple variables for multiple functions or formulas
(i think)
Answer:
hospital yestrday after noon ggpupg ki tyutrdcbhsjdvshsjjshsgsgdhsusfsuwwiiwhszia
Answer:
The correct answer is:
"a laser pointer and a remote control"
Explanation:
Let us look at the options one by one.
notes pages and an LCD projector
When she is using these options, she cannot have the freedom to move as she has to operate the projector somehow.
laptop computer and a pointer
In this case she has to operate laptop so movement will be reduced.
<u>A laser pointer and remote control</u> will give her a lot of freedom to move as she can use the remote control to operate the slides and the pointer to point stuff ont the slides.
Hence,
The correct answer is:
"a laser pointer and a remote control"
Complete Question:
Which of the following operating systems includes a virtual assistant?
Group of answer choices
a. macOS
b. Linux
c. UNIX
d. Chrome OS
Answer:
a. macOS
Explanation:
Macintosh refers to a set of computers designed, developed and manufactured by Apple Inc. Apple officially began the sales of Macintosh on the 24th of January, 1984. The first designs of Macintosh are considered to be personal computers and had a mouse, in-built screen with a graphical user interface (GUI). The operating system designed and developed for Apple computers (MacBook) is known as macOS (Macintosh operating system).
A virtual assistant can be defined as a computer software program that is artificially intelligent to understand human voice commands and performs task for the end user based on instructions or commands.
Generally, macOS is an operating system that includes a virtual assistant referred to as Siri. Siri was developed and released by Apple on the 4th of October, 2011.
<em>Siri as a virtual assistant, is able to perform tasks such as setting reminders, scheduling events, media player controls, GPS navigation, internet search, answer some questions etc. </em>