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
koban [17]
3 years ago
13

Write a flowchart and C code for a program that does the following: Uses a do...while loop. Prints the numbers from 1 to 10 with

a blank line after each number. (Hint: You'll need to use the newline character \n .)
Computers and Technology
1 answer:
emmasim [6.3K]3 years ago
4 0

Answer:

create the integer variable and initialize it to one, with the do statement, increment the variable by one and print it, then the while statement checks if the variable is less than or equal to 10.

#include <iostream>

using namespace std;

int main(){

   int i = 1;

   do {

       cout<< i << "\n";

       i++;

   }

   while (i <= 10);

}

Explanation:

The C++ source code initializes the integer variable i to one and increments and print the value if the value is less than or equal to ten. The do-while statement executes a block of code before the condition is implemented.

You might be interested in
12. Fill in the blanks: In a ____________, the root of the tree is labeled _______________, children of the root are the names o
Alona [7]

Based on the description of the tree, the missing words are:

  • Binary tree.
  • Root node.
  • Internal nodes.
  • External node.
  • Structure.

<h3>What are the parts of a binary tree?</h3>

In a <u>Binary tree</u>, the roots are called the <u>root nodes</u> and the children of those roots are called the <u>internal nodes. </u>

The leaves are meant to designate the<u> external nodes</u>. These trees are helpful in evaluating architectural alternatives because they provide <u>structure.</u>

Find out more on binary trees at brainly.com/question/14990156.

6 0
2 years ago
Mikhail is working in an IDE and needs to test a program one step at a time to find and fix errors. What tool should he use?
FromTheMoon [43]

Answer:

c) De bug ger

Explanation:

Edge 2020

8 0
3 years ago
The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
Llana [10]

Answer:

// Producer Thread

void *producer(void *param) {

buffer_item item;

while (true) {

item = rand() % 100;

sem_wait(&empty);

pthread_mutex_lock(&mutex);

if (insert_item(item))

printf("Can't insert item\n");

else

printf("Producer %d: produced %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&full);

}

}

// Consumer Thread

void *consumer(void *param) {

while (true) {

buffer_item item = NULL;

if (in > 0)

item = buffer[in - 1];

sem_wait(&full);

pthread_mutex_lock(&mutex);

if (remove_item(&item))

printf("Can't remove item\n");

else

printf("Consumer %d: consumed %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&empty);

}

}

Explanation:

An outline of the producer and consumer threads appears as shown above.

3 0
3 years ago
When methods have ____, other programs and methods may use the methods to get access to the private data.
Nostrana [21]

When methods have public access, other programs and methods may use the methods to get access to the private data.

<h3>What do you mean by public access?</h3>

The Definition of the term public access is known to be a kind of a television channel where anybody can be able to broadcast a program

An example is the city council meeting can be able to broadcast on public access.

Hence, When methods have public access, other programs and methods may use the methods to get access to the private data.

See full question below

When methods have ____, other programs and methods may use the methods to get access to the private data.

a. private access

b. public access

c. complete access

d. all access

Learn more about public access from

brainly.com/question/2736088

#SPJ1

5 0
2 years ago
Dora electronically transferred $591.68 from her checking account to Matt's checking account. In what column of the check regist
Allisa [31]
The answer is D.Payment/Debit
4 0
3 years ago
Read 2 more answers
Other questions:
  • Identifying Characters
    11·2 answers
  • Why is fluency in information technology becoming increasingly important for many college majors?
    10·2 answers
  • In a linux script, the line ____ is important because it identifies the file as a script.
    5·1 answer
  • You are tasked with implementing a recursive function void distanceFrom(int key) on the IntList class (provided). The function w
    14·1 answer
  • ____ is a website that checks a submitted paper and then determines how much of the paper is unoriginal.
    12·1 answer
  • this device can be used to type documents,send email,browse the internet,handle spreadsheets,do presentations,play games,and mor
    14·1 answer
  • Which element can be changed using the Print pane? Check all that apply
    9·1 answer
  • The table below describes the planting method used for some vegetables. Which field in this table can you define as the primary
    9·2 answers
  • To generate a series of first ten counting number of algorithm​
    9·1 answer
  • Once multiple layers are selected which keyboard shortcut merges them
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!