answer.
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
rusak2 [61]
1 year ago
7

Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha

s 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. Sample outputs with inputs: 9 5 2 -1 Body Done.
Computers and Technology
1 answer:
Delicious77 [7]1 year ago
4 0

Answer:

Following are the program in C++ language  

#include <iostream> // header file  

using namespace std; // namespace

int main() // main function

{

   int number=0; // variable declaration

   while(number>-1) // iterating the while loop

   {

       

       cout<<"body"<<endl; // dsiplay the statement

       cin>>number; // Read the value by the user

   }

   cout<<endl<<"Done";// dsiplay the statement

   return 0;

}

Output:

body

5

body

45

body

-8

Done

Explanation:

Following are the description of the statement

  • Declared a variable "number" of int type and initialized with 0 to them
  • iterating the while loop. In this loop print the message "body" and Read the value by the user in the "number" variable. This loop will be executed repeatedly until the user do not read the negative value.
  • After the execution of the while loop, it prints the message "Done".
You might be interested in
Given the macro definition and global declarations shown in the image below, provide answers to the following questions:
galben [10]

Answer:

A. 243

B. True

C. 0

Explanation:

Macro instruction is a line of coding used in computer programming. The line coding results in one or more coding in computer program and sets variable for using other statements. Macros allows to reuse code. Macro has two parts beginning and end. After the execution of statement of quiz4 x, 4 the macro x will contain 243. When the macro is invoked the statement will result in an error. When the macro codes are executed the edx will contain 0. Edx serve as a macro assembler.

4 0
1 year ago
Type the correct answer in the box. Spell all words correctly.
wlad13 [49]

Ryan should apply a filter/criteria on the Courses column and view all the courses that show Sociology

3 0
1 year ago
Which of the following is a true statement about cloud computing?
Veseljchak [2.6K]

Answer:

There are additional security risks associated with using cloud computing over local data storage.                    

Explanation:

Cloud computing: The term "cloud computing" is described as a process through which an individual tends to access and store various programs and data over the internet rather than his or her computers' "hard drive". However, the term "cloud" here refers to a specific metaphor associated with the internet.

Types:

1. Software-as-a-service or SaaS.

2. Platform-as-a-service or PaaS.

3. Infrastructure-as-a-service or IaaS.

In the question above, the very first option is correct as all other options mentioned over here are incorrect because they aren't related to cloud computing.

3 0
1 year ago
A variable like user_num can store a value like an integer. Extend the given program as indicated. Output the user's input. (2 p
lapo4ka [179]

Answer:

The answer to this question is given below in the explanation section. It is noted that this program is written in C++ using online C++ compiler.

Explanation:

#include <iostream>

using namespace std;

int squared(int num)// this is the function to compute square

   {

       return num*num;

   }

int cube(int num)// this is the function to compute cube

   {

       return num*num*num;

   }

int main()

{

   int user_num, user_num2; // variable declaration

   

       cout<<"Enter the first number: ";//prompt user to enter the number

       cin>>user_num;//store the user entered number into variable

       cout<<"\nEnter the second number: ";//prompt the user to enter the second number

       cin>>user_num2;//store the user entered number into variable

   

   

   cout<<"\nSquared of first number is: "<<squared(user_num);//compute square of user_num and display

   cout<<"\nCube of first number is: "<<cube(user_num);//compute the cube of the user_num and display

   cout<<"\nSquare of second number is: "<<squared(user_num2);//compute the square of user_num2 and display

   cout<<"\nCube of second number is: "<<cube(user_num2);//compute the cube of user_num2 and display

   

   cout<<"\nSum of number 1 and number 2 is: "<<user_num2 + user_num2;//display the sum of user_num2 and user_num

   cout<<"\nProduct of number 1 and number 2 is: "<<user_num2 * user_num;//display the product of user_num and user_num2

   

   

   return 0;//terminate the program

}

                               

7 0
2 years ago
Omar’s teacher has asked him to send her a PDF copy of his presentation via email.
Vadim26 [7]

Answer:

1. Export

2. Create PDF/XPS document

3. Standard

4. Click Publish

Explanation:

I got wrong on edg and found the correct answer

8 0
1 year ago
Other questions:
  • When driving, your attention is __________.
    5·2 answers
  • Who are the founders of video-sharing site Dailymotion?
    7·1 answer
  • Big Data often involves a form of distributed storage and processing using Hadoop and MapReduce.
    12·1 answer
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • Apart from the challenges of heterogeneity, business and social change and trust and security, identify other problems and chall
    9·1 answer
  • You'd like to change the minimum password length policy in the Default Domain Policy group policy preference (GPO). What's the b
    10·1 answer
  • Create a generic class Box with a type parameter that simulates drawing an item at random out of a box. This class could be used
    7·1 answer
  • Justify the statement "The same job title can have different job roles and different qualification criteria in different organiz
    7·1 answer
  • Write a method called printRangeOfNumbers that accepts a minimum, maximum numbers as parameters and prints each number from mini
    6·1 answer
  • Write a loop to populate the list user_guesses with a number of guesses. The variable num_guesses is the number of guesses the u
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!