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
grandymaker [24]
3 years ago
11

Program 4: But I haven’t taken Calculus yet! OK – we admit, this one might look nasty, but read on because it’s not that bad. On

e of the things that computing folks do A LOT (especially CS students) is analyze how long a program takes to run. In the first step, something might take 1 unit of CPU time. The second step might take 2, the third 3 and so on. Mathematically, that would be expressed by the "summation" operator as this: ∑???? ???? ????=1 This is may look complex, but all it’s saying is that i goes from 1 to n and you sum all those numbers together. So, if (n = 10), ∑???? ???? ????=1 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55 Fortunately, this reduces to a simple formula. When summing numbers from 1-n, the sum is: (n+1)*n/2 Why? It’s all in how you "pair" the numbers together. In the example above, we could pair (1+10) =11, (2+9)=11, (3+8)=11 and so on. That is, we have n/2 "pairs" of (n+1). Your task is, without using a loop (which we haven’t covered yet), to write a program that asks the user for a number, then prints out the sum of 1 to that number. If you use a loop, you will receive no credit
Computers and Technology
1 answer:
34kurt3 years ago
5 0

Answer:

wdadawdawdawdawdawdawdawsdwfawf

Explanation:

Program 4: But I haven’t taken Calculus yet! OK – we admit, this one might look nasty, but read on because it’s not that bad. One of the things that computing folks do A LOT (especially CS students) is analyze how long a program takes to run. In the first step, something might take 1 unit of CPU time. The second step might take 2, the third 3 and so on. Mathematically, that would be expressed by the "summation" operator as this: ∑???? ???? ????=1 This is may look complex, but all it’s saying is that i goes from 1 to n and you sum all those numbers together. So, if (n = 10), ∑???? ???? ????=1 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55 Fortunately, this reduces to a simple formula. When summing numbers from 1-n, the sum is: (n+1)*n/2 Why? It’s all in how you "pair" the numbers together. In the example above, we could pair (1+10) =11, (2+9)=11, (3+8)=11 and so on. That is, we have n/2 "pairs" of (n+1). Your task is, without using a loop (which we haven’t covered yet), to write a program that asks the user for a number, then prints out the sum of 1 to that number. If you use a loop, you will receive no credit

You might be interested in
An organization is implementing a preselected baseline of security controls, but finds not all of the controls apply. What shoul
WINSTONCH [101]

The answer is Tailoring the baseline to their needs.

After an organization selects applicable security control baseline but finds not all of the controls apply, it initiates a tailoring process to modify the controls appropriately and more closely with specific conditions related to organizational missions, information systems or environments of operation. It is an integral part of the security control selection and specification and involves risk management processes like assessing, responding to, and framing.

8 0
3 years ago
BRAINLIEST
Brilliant_brown [7]

Answer:

1. Don't

2. Do

3. Don't

4. Don't

5. Do

Hope it helps.......

3 0
3 years ago
Read 2 more answers
An apple, potato, and onion all taste the same if you eat them with your nose plugged
lys-0071 [83]

Answer:Have a good dayyyyy

Explanation:    can i be brainliest pls pls

4 0
3 years ago
Read 2 more answers
Determine the type of plagiarism by clicking the appropriate radio button.
AleksAgata [21]

Answer:

a)

Explanation:

From the writing of the student, it shows that he plagiarized the work word for word, in that

1. There was the page number of the article in his writing

2. In addition, the reference shouldn't have been added at this stage of writing but the student did added it.

5 0
3 years ago
What is an Array? 20 POINTS!!!
EastWind [94]

Answer:

I'm about 99% sure it's C: a unique address or location un the collection

6 0
2 years ago
Other questions:
  • The version of Windows that first provided networking capabilities was _____.
    12·2 answers
  • Jawana has been working on a paper for her Anatomy class for weeks. One day her little brother was on her computer and accidenta
    14·1 answer
  • When a Python program is reading a file, the data is input as plain ASCII characters in a string. What is the following code doi
    15·1 answer
  • Which of the following is not a negative environmental effect associated with cars? A. Deforestation B. Roadside litter C. Toxic
    14·1 answer
  • Which of these jobs would be most appropriate for someone who majors in information technology? A)developing new computing techn
    5·2 answers
  • Which wildcard characters will return a single character when using the Find dialog box?
    6·2 answers
  • Whats a hybrid wired network
    9·1 answer
  • A ____ is someone who develops programs and apps or writes the instructions that direct the computer or mobile device to process
    8·1 answer
  • What are two benefits of defining a function?
    14·1 answer
  • associate true with the variable has_dups if the list list1 has any duplicate elements (that is if any element appears more than
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!