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
postnew [5]
3 years ago
13

Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the cou

nt of how many numbers were entered.
Sample Run Enter a number: 1 Enter a number: 41 Enter a number: 36 Enter a number: 25 Sum: 103 Numbers Entered: 4
Computers and Technology
1 answer:
lyudmila [28]3 years ago
5 0

total = 0

count = 0

while total<=100:

   total += int(input("Enter a number: "))

   count += 1

print("Sum:",total)

print("Numbers Entered:",count)

I wrote my code in python 3.8. I hope this helps

You might be interested in
Two different ways to bring up My Computer folder
seraphim [82]
On a Windows PC, My Computer is a folder on the desktop. Alternatively, you can click on Start and access My Computer from that menu.
5 0
3 years ago
In MS Word we can merga cells true or false​
sergey [27]
In this video I showed you all of the locations for all items in Wacky Wizards!! I hope you enjoyed and please like and subscribe. Piece out!!!
7 0
2 years ago
Read 2 more answers
Write a program that reads 20 integers from the user into an array and uses a function arrayMinimum that accepts an integer arra
neonofarm [45]

Answer:

#include <iostream>

using namespace std;

int arrayMinimum(int myArray[], int myArraySize) {

int small = myArray[0];

for (int i = 0; i < myArraySize; i++) {

   if(myArray[i]<small){

small = myArray[i];

}

 }

 return small;

}

int main(){

   int myArray[20];

   for(int i =0;i<20;i++){

       cin>>myArray[i];          

   }

   cout<<"The smallest is: "<<arrayMinimum (myArray,20);

   return 0;

}

Explanation:

This solution is provided in c++

#include <iostream>

using namespace std;

This line defines the arrayMinimum function

int arrayMinimum(int myArray[], int myArraySize) {

This initializes the smallest of the array element to the first

int small = myArray[0];

This iterates through the array

for (int i = 0; i < myArraySize; i++) {

This if condition checks for the smallest

   if(myArray[i]<small){

The smallest is assigned to the small variable

small = myArray[i];

}

 }

This returns the smallest

 return small;

}

The main method begins here

int main(){

This declares an array of 20 elements

   int myArray[20];

The following iteration allows user input into the array

<em>    for(int i =0;i<20;i++){ </em>

<em>        cin>>myArray[i];          </em>

<em>    } </em>

This calls the method and returns the minimum

   cout<<"The smallest is: "<<arrayMinimum (myArray,20);

   return 0;

}

6 0
2 years ago
24/3*2^2/2*3+(20-10)-40
ycow [4]

Answer:

34

Explanation:

You use pemdas

8 0
2 years ago
Which of the following is another term for a subfolder​
marin [14]

Answer:

below

Explanation:

subdirectory

5 0
3 years ago
Other questions:
  • What is a critique of the feature detector model of object recognition?​?
    8·1 answer
  • Which is true about POP3 and IMAP for incoming email?
    6·1 answer
  • Explain three applications of data mining
    14·1 answer
  • You are a network engineer tasked with performing a site survey for a multiple-channel architecture (MCA) system in a three-stor
    11·1 answer
  • What should be used to keep a tablet dry?
    13·1 answer
  • Hannah decides to burn her video portfolio to a DVD. She wants to hand it over to a movie producer she will meet at a social eve
    15·1 answer
  • Charlie makes pizza at a restaurant. The customers always compliment how great the pizza tastes. But Charlie takes a long time t
    7·2 answers
  • 3.
    12·1 answer
  • Help me pls...
    7·2 answers
  • what option can be used to create vpn connections that can be distributed to users' computers so that vpn clients do not have to
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!