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
Anestetic [448]
3 years ago
11

The while loop has two important parts: an expression that is tested for a true or false value, and:

Computers and Technology
1 answer:
agasfer [191]3 years ago
5 0

Answer:

The correct answer for the given question is option(A) i,e a statement or block that is repeated as long as the expression is true.

Explanation:

While loop is an entry control loop it means if the condition in while loop is true then the statement inside the while loop is executed untill condition of while loop is false .

Following are the syntax of while loop

while(condition checking)

{

// statement

// increment or dec variable;

}

Let us consider an example of while loop

Following are the program in c++

#include<iostream> // header file

using namespace std; //namespace

void main() // main method

{

int k=1; // variable declarartion

while(k<5) // iterating over loop

{

cout<<"hello brainly:";

k++; // increment of k by 1

}

}

In the following code the variable k is initialized by 1 so 1<5 condition is "true" it executed the statement  inside the loop that menas when k=1 it print hello brainly: after printed the message  hello brainly: it increment the value of k by 1, Now k becomes "2" again 2<5 condition is "true "it executed the statement again .This process will continue untill k=5 when k=5 the condition is "false" it terminate the while loop.

Output

hello brainly:hello brainly:hello brainly:hello brainly:hello brainly:

You might be interested in
Which key should you press to leave the cell as it originally was?
GREYUIT [131]
The correct answer should be A. Delete
4 0
3 years ago
Designations at the end of file names such as .docx and .html are called
Amanda [17]

Answer:

Designations at the end of file names such as .docx and .html are called. File extensions.

Explanation:

7 0
3 years ago
Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
Olin [163]

The following cose will be used to copy assignment operator for CarCounter

<u>Explanation:</u>

Complete Program:

#include <iostream>

using namespace std;

class CarCounter

{

public:

CarCounter();

CarCounter& operator=(const CarCounter& objToCopy);

void SetCarCount(const int setVal)

{

 carCount = setVal;

}

int GetCarCount() const

{

 return carCount;

}

private:

int carCount;

};

CarCounter::CarCounter()

{

carCount = 0;

return;

}

// FIXME write copy assignment operator

/* Your solution goes here */

CarCounter& CarCounter::operator=(const CarCounter& objToCopy)

{

if(this != &objToCopy)

 carCount = objToCopy.carCount;

return *this;

}

int main()

{

CarCounter frontParkingLot;

CarCounter backParkingLot;

frontParkingLot.SetCarCount(12);

backParkingLot = frontParkingLot;

cout << "Cars counted: " << backParkingLot.GetCarCount();

cout << endl << endl;

system("pause");

return 0;

}

5 0
3 years ago
Downlad the file and write a program named Lab10b_Act2.py that does the following: Opens the CSV file for reading Reads the CSV
a_sh-v [17]
他們會不會是因為這樣就是說他們的問題,他們會會覺得委屈覺得我
5 0
2 years ago
Give several reasons why Python is such a great programming language. Explain how Python is related to flowcharts.
luda_lava [24]

Answer:

Python is the current language of choice in schools because it helps people build good coding techniques very quickly, and it has a robust range of uses. Code presentation is also an increasingly important distinction between the two languages. In the past, developers used code largely to create applications.

Explanation:

Python is related to flowcharts. because You write a program by setting up a flowchart. When you run the flowchart the software compiles to python byte-code so that you can easily import modules you write in Flowchart Python into standard Python programs.

sorry if i'm wrong

4 0
2 years ago
Other questions:
  • PLEASE HURRY What data unit is addressed based on the IP address of the recipient? a. packet b. frame c. segment d. section
    9·2 answers
  • Which statement reflects inherent bias in reading and learning about our world?
    12·1 answer
  • 6. The NADH and FADH2 produced during the Krebs cycle pass their electrons down the 7. __ __ __ __ __ __ __ __ __ __ __ __ __ __
    6·1 answer
  • What is displayed on the console when running the following program? class Test { public static void main(String[] args) { try {
    10·1 answer
  • You will implement three different types of FFs with two different reset types. You have to show your results on your FPGA. You
    9·1 answer
  • Describe the components of a CPU--the CU, ALU, and Cache--and explain how they interact to make the CPU function.
    13·1 answer
  • Plzz help.... <br><br>i will mark u as brainliest if u answer correct
    10·1 answer
  • Which of the following candidates would most likely be hired as a graphic artist?
    15·2 answers
  • Explain the following terms <br><br>copyleft:<br><br>creative Commons:<br><br>GNU/GPL:​
    8·1 answer
  • When delivering digital technologies to clients, what is a best practice to make those solutions sustainable?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!