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
Greeley [361]
3 years ago
7

write a program in which the user can enter X amount of numbers. Once the user has enter 10 positive numbers, the user may not e

nter anymore numbers. Then the program should display the sum of those 10 positive number and also display the 10 positive numbers.
Computers and Technology
1 answer:
11111nata11111 [884]3 years ago
7 0

Answer:

The following code is in C++.

#include <iostream>

using namespace std;

int main() {

   int a[10],sum=0;//declaring an array and initialized variable sum with value 0.

   cout<<"Enter the numbers"<<endl;

   for(int i=0;i<10;i++)

   {

       cin>>a[i]; //taking input of 10 integers.

   }

   for(int i=0;i<10;i++)

   {

       sum=sum+a[i];//finding the sum..

   }

   cout<<"The sum is : "<<sum<<endl<<"The numbers entered are "<<endl;

   for(int i=0;i<10;i++)

   {

       cout<<a[i]<<" ";//displaying the elements.

   }

return 0;

}

Output:-

Enter the numbers

1 2 3 4 5 6 7 8 9 10

The sum is : 55

The numbers entered are  

1 2 3 4 5 6 7 8 9 10

Explanation:

I have taken an array of size 10 so that no more than 10 integers could fit in it.After that taking the input from the user prompting 10 integers using the for loop.After that finding the sum.Then printing the sum and the numbers entered.

You might be interested in
Of the three types of mutating malware, what type changes its internal code to one of a set number of predefined mutations whene
Mandarinka [93]
The answer is Oligomorphic malware​.
7 0
3 years ago
Cycle technology implemented a dibs initiative last year for one of the manufacturing sites. however, the initiative is not prog
shtirl [24]
  • A possible reason the DIBS initiative is not developing as planned is that the company keeps DIB separate from day-to-day operations. DIB must be part of the ecosystem in running the company and not separate.

  • A manufacturing process is the method a business will follow to make the product. The type of manufacturing you can use is determined by several factors such as the market demand for products, the state of raw materials, and the availability of resources and the state of your factory. The manufacturing techniques are all different and have their respective advantages if used in accordance with Standard Operating Procedures and of course also have disadvantages for each manufacturing technique.

Learn more about Manufacturing Process here brainly.com/question/28384697

#SPJ1

5 0
2 years ago
computer has a 32-bit instruction word broken into fields as follows: opcode, six bits; two register file address fields, five b
lina2011 [118]

Answer:

a.  2^6, or 64 opcodes.

b.  2^5, or 32 registers.

c. 2^16, or 0 to 65536.

d.  -32768 to 32768.

Explanation:

a. Following that the opcode is 6 bits, it is generally known that the maximum number of opcodes should be 2^6, or 64 opcodes.

b. Now, since the size of the register field is 5 bits, we know that 2^5 registers can be accessed, or 32 registers.

c. Unsigned immediate operand applies to the plus/minus sign of the number. Since unsigned numbers are always positive, the range is from 0 to 2^16, or 0 to 65536.

d. Considering that the signed operands can be negative, they need a 16'th bit for the sign and 15 bits for the number. This means there are 2 * (2^15) numbers, or 2^16. However, the numbers range from -32768 to 32768.

6 0
4 years ago
The following is the correct way to write a for loop
Rzqust [24]

Answer:

for i in range

Explanation:

This is the only excerpt of code

3 0
3 years ago
What does this program does?
tester [92]
Peoples from around the world help you answer the question you have.
4 0
4 years ago
Other questions:
  • Type the correct answer in the box.
    7·1 answer
  • Which major and minor keys have no sharps or flats apex?
    5·2 answers
  • We say that a sequence of numbers is a palindrome if it is read the same backward or forward. For example, the sequence: 6, 15,
    11·1 answer
  • Simplify (6x+6)+(-3-4x) please hurry!!!!!
    6·1 answer
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • "Most of us know that when we come into a college classroom, we will see desks and chairs, a computer station and a projector. A
    6·1 answer
  • Develop Java methods to perform the following operations on an unordered list (using linked lists). What is the complexity of ea
    15·1 answer
  • What is one thing the ADDIE model does NOT account for?
    14·1 answer
  • What did the Copernican revolution demonstrate?
    15·1 answer
  • Network administrators use _______ technology to get antivirus updates to be automatically downloaded on employees' workstations
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!