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
LuckyWell [14K]
3 years ago
14

CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n

umber greater than or equal to 0. Note: These activities may test code with different test values. This activity will perform three tests, with user input of 9, 5, 2, -1, then with user input of 0, -17, then with user input of -1. See "How to Use zyBooks" . Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Program end never reached." The system doesn't print the test case that caused the reported message.
Computers and Technology
1 answer:
tino4ka555 [31]3 years ago
3 0

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
You might be interested in
What changes do you need to a algorithm to compare 100 numberst
Aliun [14]

Answer:

It really depends - in general every data structure has its use.

Explanation:

Furthermore, traversing the list will be inefficient because the data items are not contiguous in memory, forcing the CPU to jump all over the RAM memory causing further slowdown.

3 0
4 years ago
A Turing machine with doubly infinite tape (TMDIT) is similar to an ordinary Turing machine except that its tape is infinite to
umka2103 [35]

Answer and Explanation:

A TM with doubly infinite tape can simulate an ordinary TM. It marks the left-hand end of the input to detect and prevent the head from moving off of that end. To simulate the doubly infinite tape TM by an ordinary TM, we show how to simulate it with a 2-tape TM, which was already shown to be equivalent in power to an ordinary

TM. The first tape of the 2-tape TM is written with the input string, and the second tape is blank. We cut the tape of the doubly infinite tape TM into two parts, at the starting cell of the input string. The portion with the input string and all the blank spaces to its right appears on the first tape of the 2-tape TM. The portion to the left of the input string appears on the second tape, in reverse order.

3 0
3 years ago
Which is the best organizational flow for a project?
abruzzese [7]

Answer:

client folder/project folder/images folder/image files

Explanation:

The basic propose of organizing projects documents and images is to find the documents in an easy manner.

The organizational flow of the document is as flow:

  1. First of all create the folder with the name of client, Whose project is going to be started. As there can be multiple clients, so make separate folder for each.
  2. In second step, Create the Project folder that is going to be started, as there are many projects you are working on for the same client.
  3. Then create the image folder inside the project folder, as there can be many other files types of the project.
  4. Then save the images in the image folder.

So, the option is better for this is

client folder/project folder/images folder/image files

6 0
4 years ago
Can you guess why some of the nodes would still have statically assigned ip addresses?
LiRa [457]

<span>The manual assignment of an IP address to a system is called static addressing. Since the assignment of IP has been entered manually using ARP utility, the network administrators probably forgot to remove the manually configured nodes with IP addresses.  </span>

7 0
3 years ago
In order for you to realize there has been a sensory change, it has to reach the __________ level of processing.
Kryger [21]

Answer: In order for you to realize there has been a sensory change, it has to reach the <u>perceptual</u> level of processing.

6 0
3 years ago
Other questions:
  • Elsa has collated information for a meeting using Excel. Due to certain developments, some of the data in her worksheet is now r
    6·1 answer
  • Randy is concerned about his company’s data security on the Internet. Because cellular signals are not encrypted, he is concerne
    6·1 answer
  • Who is the inventor of cpu?
    5·1 answer
  • Why is the wizard able to install the printer when an actual print device is not connected to the computer??
    11·1 answer
  • To add another worksheet to an Excel file, click on the _____
    15·1 answer
  • Which of the following statements are not true about TCP? (Multiple answers)
    6·1 answer
  • In a stream channel what is deposited first?
    7·1 answer
  • Love me love me say that u love me fool me fool me go on and fool me : ) answer the question thx
    6·2 answers
  • Write a function that takes a list and returns its first element​
    15·1 answer
  • What is a BUG in terms of computer programming?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!