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
Drupady [299]
3 years ago
9

Write a program that will add up the series of numbers: 99,98, 97...3.2.1. The program should print the running total as well as

the total at the end.
The program should use one for loop, the range() function and one print() command.
Sample Run
99
197
294
390
-
4940
4944
4947
4949
4950
Computers and Technology
1 answer:
Gekata [30.6K]3 years ago
7 0

Answer:

result = 0

for i in range(99, 0, -1):

   result += i

   print(result)

Explanation:

You might be interested in
Can a result that contains road maps for European countries have a highly meets rating
Mice21 [21]

Đápán3e

Explanation:

8 0
3 years ago
Input 10 integers and display the following:
LekaFEV [45]

Answer:

// code in C++

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

   int sum_even=0,sum_odd=0,eve_count=0,odd_count=0;

   int largest=INT_MIN;

   int smallest=INT_MAX;

   int n;

   cout<<"Enter 10 Integers:";

   // read 10 Integers

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

   {

       cin>>n;

       // find largest

       if(n>largest)

       largest=n;

       // find smallest

       if(n<smallest)

       smallest=n;

       // if input is even

       if(n%2==0)

       {  

           // sum of even

           sum_even+=n;

           // even count

           eve_count++;

       }

       else

       {

           // sum of odd    

          sum_odd+=n;

          // odd count

          odd_count++;

       }

   }

   

   // print sum of even

   cout<<"Sum of all even numbers is: "<<sum_even<<endl;

   // print sum of odd

   cout<<"Sum of all odd numbers is: "<<sum_odd<<endl;

   // print largest

   cout<<"largest Integer is: "<<largest<<endl;

   // print smallest

   cout<<"smallest Integer is: "<<smallest<<endl;

   // print even count

   cout<<"count of even number is: "<<eve_count<<endl;

   // print odd cout

   cout<<"count of odd number is: "<<odd_count<<endl;

return 0;

}

Explanation:

Read an integer from user.If the input is greater that largest then update the  largest.If the input is smaller than smallest then update the smallest.Then check  if input is even then add it to sum_even and increment the eve_count.If the input is odd then add it to sum_odd and increment the odd_count.Repeat this for 10 inputs. Then print sum of all even inputs, sum of all odd inputs, largest among all, smallest among all, count of even inputs and count of odd inputs.

Output:

Enter 10 Integers:1 3 4  2 10 11 12 44 5 20                                                                                

Sum of all even numbers is: 92                                                                                            

Sum of all odd numbers is: 20                                                                                              

largest Integer is: 44                                                                                                    

smallest Integer is: 1                                                                                                    

count of even number is: 6                                                                                                

count of odd number is: 4

3 0
3 years ago
High quality pages in a task should all get the same Needs Met rating. For example, a high quality page for a common interpretat
miskamm [114]

Answer:

The given statement is False.

Explanation:

  • Needs Met Rating of a result show us that how much the result is fulfilling the query of the user. The greater the needs met rating is, the greater the satisfaction of the user is.
  • If a page has high quality then it can or can not be useful for the user.
  • If the page has high quality as well as high needs met rating then it is best for the user.
  • If the page has high quality and has low needs met rating that means it is not relevant to the query so not useful for the user.
  • Thus, it is concluded that high quality pages in a task shouldn't all get the same needs met rating rating rather need met rating is dependent upon the relevancy and usefulness of the result to the need and query of the user.
8 0
3 years ago
Fredrico has to lead a training for his company. He wants to include a visual element to help engage his audience. What type of
andreyandreev [35.5K]
Presentation software is probably his best option. It would allow him to present visual and audio supplements to his audience.
8 0
3 years ago
Read 2 more answers
Please help! I don’t know the answer to it :( it’s Fashion marketing
Oxana [17]

Answer:

I believe the answer should be C)

Sorry if it’s wrong,but hope it helps

8 0
3 years ago
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • The set of communications rules for exchanging information electronically on the internet is called the ________.
    10·1 answer
  • Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
    12·1 answer
  • _______ is a form of crime that targets a computer system to acquire information stored on that computer system, to control the
    15·1 answer
  • CodeHS 3.4.5. What is the code for four colored triangles.
    8·1 answer
  • The M:N relationship between STUDENT and CLASS must be divided into two 1:M relationships through the use of the ENROLL entity;
    10·2 answers
  • Which screen should be open to customize or personalize a desktop background?
    15·2 answers
  • 3. State whether the given statements are true or false. a. The computer is called a data processor because it can store, proces
    13·1 answer
  • 12.2 Sort an array in ascending order Write a program that gets a list of integers from input, and outputs the integers in ascen
    10·1 answer
  • What is the correct keyboard shortcut to cut a cell value
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!