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]
2 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]2 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
A 10 Superscript negative 910−9​-F capacitor ​(11 nanofaradnanofarad​) is charged to 5050 V and then disconnected. One can model
vredina [299]

Answer:

Explanation:

i) On a cold day, Capacity = (66 X 910 X 10∧-9) F

Charge, Q = (66 X 910 X 10∧-9) X 5050 = 0.30 Columb

Current, I= 5050/131013 = 0.039 Amp (where Resistance = 131013 ohms)

Time, t= 0.30/0.039 = 7.7 seconds

ii) On a humid day, Capacity = (77 X 910 X 10∧-9) F

Charge, Q = ( 77 X 910 X 10∧-9) X 5050 = 0.35 Columb

Current, I= 5050/6106 = 0.83 Amp ( where Resistance = 6106 ohms)

Time, t= 0.35/0.83 = 0.42 h or  0.42 X 60 mins = 25 mins

7 0
3 years ago
Define a JavaScript function named showGrades which does not have any parameters. Your function should create and return an arra
grandymaker [24]

Answer:

see explaination

Explanation:

//selective dev elements by id name

var gradeA = document.querySelector("#GradeA");

var passing = document.querySelector("#Passing");

var learning = document.querySelector("#Learning");

//function showGrades

function showGrades() {

var arr = [];

//converting string to int and inserting into array

arr[0] = parseInt(gradeA.textContent);

arr[1] = parseInt(passing.textContent);

arr[2] = parseInt(learning.textContent);

//creating json blob

var blob = new Blob(new Array(arr), {type:"text/json"});

return blob;

}

8 0
3 years ago
What is an XML-based open standard for exchanging authentication and authorization information and is commonly used for web appl
nalin [4]

Answer:

SAML.

Explanation:

SAML seems to be an accessible standardized XML-based for some of the sharing of validation and verification details and has been generally implemented for the web apps and it seems to be a design that would be SSO. Verification data is shared via XML documentation which are securely signed. So, the following answer is correct according to the given scenario.

4 0
2 years ago
Which components are involved with input? Output? Processing? Storage?
VMariaS [17]

Answer: Output

input keyboard mouse joystick graphics tablet trackball touchpad touchscreen microphone sensor      

Processing     processor (CPU) processor (GPU) memory motherboard

Output printer monitor touchscreen plotter speakers headphones motor data projector

Explanation:

5 0
2 years ago
Read 2 more answers
____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
Anni [7]

Answer:

C. Confidentiality

Explanation:

With confidentiality, a person who intercepts messages you intend to remain private cannot read them and thus increases your document protection

8 0
2 years ago
Other questions:
  • Jail and prison officials may generally limit inmate rights when the limitations serve
    13·2 answers
  • Briefly describe "SoftwareEngineering Framework". Do provide examples and diagrams wherenecessary.
    15·1 answer
  • How might writing an online journal be different than writing in a paper one ​
    15·2 answers
  • A firewall, when properly implemented, can prevent most attacks on your system.
    11·1 answer
  • (Please answer! Correct answer gets brainliest!)
    5·2 answers
  • What is the difference between a design pattern and a DLL?
    12·1 answer
  • The model for Diminishing Marginal Utility is ______ in nature.
    12·1 answer
  • Which areas of a business would most benefit from using the Workday platform?
    7·1 answer
  • I am a non-volatile type of built-in memory. I store my contents long-term. My job is to store critical programs that the comput
    14·1 answer
  • 13. In cell B16, use the SUMIF function and structured references to display the total wins for teams in the Youth league.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!