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
erastovalidia [21]
3 years ago
7

ven int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 5

0 positive integers and store this value in total. Thus your code should put 1*1 2*2 3*3 ... 49*49 50*50 into total. Use no variables other than k and total.
Computers and Technology
1 answer:
monitta3 years ago
3 0

Answer:

Following are statement is given below

int  k=1,total=0; // variable declaration

while(k<50) // iterating the while loop

{

   total=total+k*k;//  calculating the square

   k=k+1; // increments the value of k by 1    

}

Explanation:

Following are the description of Statement.

  • Declared a variable "total" and "k" of the "integer " type initialized the total to 0 and "k" to 1.
  • Iterating the while loop for less then 50 .In this loop, we calculating the sum of square of first 50 number in the "total" variable .
  • After that increment the value of "k" variable by 1 to execute the loop less then 50 .

You might be interested in
Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
boyakko [2]

Answer:

Option 1: May crash at runtime because it can input more elements than the array can hold

Explanation:

Given the code as follows:

  1.        int[] a = {1, 3, 7, 0, 0, 0};
  2.        int size = 3, capacity = 6;
  3.        int value = cin.nextInt();
  4.        while (value > 0)
  5.        {
  6.            a[size] = value;
  7.            size++;
  8.            value = cin.nextInt();
  9.        }

From the code above, we know the <em>a</em> is an array with six elements (Line 1). Since the array has been initialized with six elements, the capacity of the array cannot be altered in later stage.

However, a while loop is created to keep prompting for user input an integer and overwrite the value in the array started from index 3 (Line 4- 9). In every round of loop, the index is incremented by 1 (Line 7). If the user input for variable <em>value</em> is always above zero, the while loop will persist.  This may reach a point where the index value is out of bound and crash the program. Please note the maximum index value for the array is supposedly be 5.  

8 0
3 years ago
Everyone say bye to brainly cause I’m reporting it for being against the law
PilotLPTM [1.2K]

Answer:   really

Explanation:

Opp

4 0
3 years ago
Read 2 more answers
A __________ is an entity that manages the use, performance, and delivery of cloud services, and negotiates relationships betwee
densk [106]

Answer:

Cloud Broker is the correct answer of this question.

Explanation:

A cloud broker is a person or industry government entity acting as an operator between the buyer of a cloud computing service and the buyers of that software

  • In a cloud broker would be someone who operates as an interpreter during negotiation involving two or more organizations.
  • A cloud broker is a technology platform which utilizes function transmission between multiple third party service suppliers.
4 0
3 years ago
_____ relies on lies and misrepresentation to trick an authorized user into providing information or access to an attacker.
kap26 [50]

Answer:

"Social engineering" is the correct answer for the above question.

Explanation:

  • Social engineering is a process, which gives the idea for the hacker or unauthorized user to get inside the system or hack the system.
  • It is used to read the humans data or psychologically hack human data.
  • It teaches the processor by an attacker to be the master of the authorized user. By this, an attacker can able to know the authorized term with the help of an authorized person.
  • The above question asks about the term, which is used to help the hackers to hack the system. This term is known as Social Engineering.

6 0
3 years ago
The CPU (central processing unit), also known as a processor, is considered the brain of the computer. What is the CPU’s functio
MakcuM [25]

It performs the basic arithmetical, logical, and input/output operations of a computer

4 0
3 years ago
Other questions:
  • How i can connect to internet automatically when i switch on my computer?
    8·1 answer
  • 1. Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bit memory address
    7·1 answer
  • In Load/Store Architecture, memory is only referenced by load and store instructions.
    15·1 answer
  • Given a Student class, create a class with following characteristics:
    6·1 answer
  • Name the different types of constructors that a designer can provide in a class. Provide an example with a class showing many co
    15·1 answer
  • Wired network are the most reliable and provide the highest speed?
    7·1 answer
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • Which of the following Web sites would be MOST credible?
    6·1 answer
  • What can macro mode on a camera be used for?
    12·2 answers
  • Select the correct answer.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!