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
Rufina [12.5K]
2 years ago
5

Write a program that: Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint:

use Mod). Displays the sum.
Computers and Technology
1 answer:
Alika [10]2 years ago
5 0

Answer:

Following are the code to this question:

#include <iostream>//defining header file

using namespace std;

int main()//defining main method

{

int x[]={2,3,4,6,7,8,9,1,11,12};//defining 1-D array and assign value

int i,sum=0;//defining integer variable

for(i=0;i<10;i++)//defining loop for count value

{

   if(x[i]%2==1)//defining if block to check odd value

   {

       sum=sum+x[i];//add value in sum variable

   }

}

cout<<sum;//print sum

return 0;

}

Output:

31

Explanation:

In the above-given program, an integer array "x" is declared that holds some integer values, and in the next line two integer variable "i and sum" is defined which is used to calculate the value.

In the next line, a for loop is declared, that counts all array value, and it uses the if block to check the odd value and add all the value into the sum variable.

You might be interested in
Malcolm is part of a team developing a new smartphone app to track traffic patterns. Because team members are located throughout
Umnica [9.8K]

Answer:

Virtual team

Explanation:

A virtual team is also known as a remote team, where every member of the team is working from different geographic locations. Usually, the communication channel is through voice/video conferencing or email.

Each member of the team is given unique roles and these roles are delivered optimally within the specified time frame.

For instance, Malcolm does not meet with other members of the team, yet they are working on a project (a smartphone app to track traffic patterns). Following standards that would have applied if they were working at a specific location.

Thanks to Information and Communication Technology (ICT), virtual jobs are on the increase, providing jobs to a lot of people not minding their geographic location.

7 0
3 years ago
A(n) ________ is a specific type of computer program that manages all programs on a computer.
Oksi-84 [34.3K]
A kernel manages the whole computer including hardware. In Unix, all processes are launched from systemd/launchd.
4 0
3 years ago
Referat noaptea la școala cu sfârșit de groază​
solniwko [45]

Te ajut eu daca vrei tu la refera

7 0
2 years ago
In terms of resource utilization, a /an application may require higher local
aksik [14]

Answer: A) Installed

Explanation: Installed application work on the system on which they are installed .They are supposed to persist the required speed of processing to execute the task ,enough memory and other resources as well to fulfill the need of the application functioning.

Other option is incorrect because cloud based application run with help of internet service via web browser so they resources in this applications based on the internet connectivity and browser's speed .Thus, the correct option is option(A).

3 0
3 years ago
First, define an integer variable and assign it any value of your choice. Then you'll need to perform the following operations w
Tcecarenko [31]
Python code:

x=121
x += 9
x *= 2
x -= 4
x >>= 2
x -= 121
7 0
2 years ago
Other questions:
  • Texture fills are available to add as a slide background true or false
    7·2 answers
  • Sally thought of adding a new paragraph after the
    6·1 answer
  • Consider the problem of solving two 8-puzzles.
    10·1 answer
  • Paul has been working long hours. He is tired and distracted by family issues,
    10·1 answer
  • Which function calls would provide the most helpful test of this function? Remember: With tests, you are attempting to figure ou
    5·1 answer
  • Which one is exit controllefd loop ?<br>1.while loop <br>2. for loop<br>3. do loop<br>4. none <br>​
    11·1 answer
  • How do I create a powershell script to make a Windows user account that is a non-admin user
    7·1 answer
  • What is the main function of processing unit​
    5·2 answers
  • Meera has created a small program in Python. She wants to store elements of the same data type in an organized
    7·1 answer
  • this feature offered by mutual funds allows investors to switch from one mutual fund to another within a fund families.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!