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
Snowcat [4.5K]
2 years ago
13

Given a variable n refers to a positive int value, use two additional variables, k and total to write a for loop to compute the

sum of the cubes of the first n counting numbers, and store this value in total. thus your code should put 1*1*1 + 2*2*2 + 3*3*3 +... + n*n*n into total. use no variables other than n, k, and total.
Computers and Technology
1 answer:
maksim [4K]2 years ago
5 0
You could do it like this (example for n=5).

int n = 5;
int total = 0;
for (int k = 1; k <= n; k++) total += k*k*k;

You might be interested in
DJ Davon is making a playlist for an internet radio show; he is trying to decide what 1212 songs to play and in what order they
Alja [10]

There are some typos in this question as the numbers become too large and lead to undefined during calculations.

so the correct data is:

Songs = 12

Rock = 15

Blues = 20

Disco = 15

The answer & explanation for this question is given in the attachment below.

4 0
3 years ago
Does technology get in the way of learning ?<br> Help Meh ! ♥ Some ideas :D
Nady [450]
Yes, and no, social network can distract a student like YouTube or face book, while it can be used as a tool for studying and to put your google documents in the cloud. plus if a teacher posts homework on his/her website, and you happen to forget the paper bringing it home, you can just simply print it instead of having to explain to the teacher
6 0
3 years ago
Read 2 more answers
C - Language Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. E
Jobisdone [24]

Answer:

Replace

/* Your solution goes here */

with

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

Explanation:

The question requires that the first three elements of array runTimes be printed;

The first three elements are the elements at the first, second and third positions.

It should be noted the index of an array starts at 0;

  • So, the first element has 0 as its index
  • The second has 1 as its index
  • The third has 2 as its index

So, to make reference to the first three elements, we make use of

<em>runTimes[0], runTimes[1] and runTimes[2]</em> respectively

Having mention the above;

It should also be noted that array is of type integers;

So, to display integers in C, we make use of "%d";

Hence, the print statement for the first three elements is

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

8 0
3 years ago
Problem 1 (Authentication): Consider the following authentication protocol, which uses a classical cryptosystem. Alice generates
Elis [28]

Answer:

Check the explanation

Explanation:

Yes, going by the question above, the protocol validates Bob to Alice for the reason that the key is only shared between Bob and Alice as well as the number which is being sent randomly. Therefore the invader won’t be able to predict and response to that number. Because of the authentication protocol, that makes use of a classical cryptosystem thereby resulting into the possibility of an argument such that key finding is attainable via invader.

5 0
3 years ago
Please NEED HELP ASAP WILL MARK BRAINLIEST ONLY #8
ValentinkaMS [17]

Answer:

I think its A

Explanation:

6 0
2 years ago
Other questions:
  • What is basic function of an operating system?
    10·2 answers
  • I need a idea of a origami for my coding class and it needs to be easy to make
    15·2 answers
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • Which of the following is not a common network architecture type?
    9·1 answer
  • Describe what is meant by the following:
    14·1 answer
  • The U.S. economy is a free enterprise system.<br><br> True<br> False<br><br> PLEASE DONT GUESS
    8·2 answers
  • What is the different between ethical and legal issues?​
    6·1 answer
  • Robert works in a call center and receives a call from Kathy. Kathy says she can no longer access the online reporting applicati
    13·1 answer
  • Describe the different
    12·1 answer
  • How do you create multiple columns in Word?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!