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
lesantik [10]
3 years ago
9

Write a program that continually prompts the user for an integer input until input is entered that is less than 0. Each input th

at is accepted is appended to an array named inputs, until an invalid input is given. When the first invalid input is entered the program prints the array and exists.
Computers and Technology
1 answer:
professor190 [17]3 years ago
7 0

Answer:

Following are the program in the C++ Programming Language:

#include <iostream>//header file

using namespace std;//namespane

//set main method

int main() {  

int a[100]; //set integer type array variable

int value, i = 0; //set integer variables

cout<<"Enter less than 0 to exit:"<<endl; //message for exit

cout<<"Enter the integer numbers:"<<endl; //message to enter numbers

do{ //set do while

cin>>value; //get input from the user

a[i++] = value; //append elements in array

}while(value>=0);

i--;  

cout<<"\nArray are:"<<endl;//message for array

for(int k = 0;k<i;k++){ //set for loop

cout<<a[k]<<" "; //print array

}

return 0;

}

<u>Output</u>:

Enter less than 0 to exit:

Enter the integer numbers:

1

2

3

4

5

-1

Array are:

1 2 3 4 5

Explanation:

Here, we set the integer data type main method "main()" and inside it:

  • we set integer type array variable with index value 100.
  • we set two integer type variable "value" and "i" initialize value 0.
  • we set the do-while loop in which we get the input from the user and and append in the array and pass condition if the value is greater then equal to 0.
  • Finally, set for loop and print the elements of an array.

 

You might be interested in
A palindrome is a string that reads the same both forward and backward. For example, the string madam is a palindrome. Write a p
miskamm [114]

Answer:

Explanation: Hey bro! Sorry to bother. But have any of your questions got deleted after posting them? I don't know why my question got deleted by a guy.

8 0
3 years ago
Which machine will work best to dig a hole in the soil?
sertanlavr [38]
I think the correct answer from the choices listed above is option A. The machine that will work <span>best to dig a hole in the soil would be a screw. The other two choices are not really used to dig a hole in the soil. Hope this answers the question. Have a nice day.</span>
8 0
3 years ago
Use the distributive property to simplify each expression 6(m+7+t)+6m-2t
Nutka1998 [239]
6(m+7+t)+6m-2t
= 6m + 42 + 6t + 6m - 2t
= 12m + 4t + 42

Hope this helps

Photon
4 0
3 years ago
What type of file is MyFile.dll?
vampirchik [111]

Answer:

The answer to this question is given below in the explanation section

Explanation:

A DLL  (Dynamic Link Library ) file is a compiled library that contains a set of procedures and/or drivers that are referenced and executed by a Windows program. It allows multiple programs to access shared functions through common libraries. DLL file has .dll extension at the end of file name.

When a program is launched, links to the necessary .dll files are created. If a static link is created, the .dll files will be in use as long as the program is active. If a dynamic link is created, the .dll files will only be used when needed. Dynamic links help programs use resources, such as memory and hard drive space, more efficiently. These files can be used in more than one program and in multiple programs at the same time. Some .dll files come with windows operating system while others are added as a new program is installed on system.

7 0
3 years ago
Read 2 more answers
In this activity, you will create a Portable Document Format (PDF) version of a photography career résumé. You will include all
Troyanec [42]

Answer:

Use Adobe Acrobat or another software that enables you to create a PDF.

Explanation:

Download Adobe Acrobat from the official website.

Once you've installed the software, follow the instructions of your assignment. A good example of a resume for a photography career can be found through a web search, any should do.

Once you've opened up the program, you'll find the tools in the toolbar to help you organize the resume however you'd like it to look. It doesn't matter how you structure the resume, what matters is that you include all of the necessary information asked of you for your assignment.

You can look up important details that should be included in your resume online through a web search.

I hope this helps! And good luck!

4 0
2 years ago
Other questions:
  • The intended purpose of the following module is to determine whether the value parameter is within a specified range. The module
    14·1 answer
  • How do i fix my this??
    12·2 answers
  • ___ Jacking is a crime that takes place when a hacker misdirects URL to a different site. The Link Itself Looks Safe, But the us
    11·1 answer
  • You are setting up a desktop computer for an AutoCAD specialist who needs a minimum of 125GB of RAM. Which operating system belo
    6·1 answer
  • What is contrast (in Photography)?
    14·1 answer
  • If you’re the victim of cyber bullying behavior, besides contacting your teacher or the school, where else can you go to find in
    13·1 answer
  • . Service recovery refers to A. the ability to quickly restore service following a service failure and provide compensation. B.
    5·1 answer
  • list out the application of the computer and explain it?(and as the answer for this question as image) ​
    7·1 answer
  • If you were creating a program that would convert Fahrenheit to Celsius, which kind of variable would you want to use? a string
    7·2 answers
  • PLEASE HELP ASAP
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!