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.
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.
The code is in Java.
It uses for loop, if-else structure, and mod to calculate the sum of odd numbers in a list.
Comments are used to explain each line of code.
You may see the output in the attachment.
//Main.java
import java.util.*;
public class Main
{
public static void main(String[] args) {
//create a list with some numbers
List<Integer> lotsOfNumbers = Arrays.asList(7, 20, 1002, 55, 406, 99);
//initialize the sum as 0
int sumOfOdds = 0;
//create a for each loop to iterate over the lotsOfNumbers list
//check each number, if it is odd or not using the mod
//if it is odd, add the number to the sum (cumulative sum)
for (int number : lotsOfNumbers){
if(number % 2 == 1)
sumOfOdds += number;
}
//print the sum
System.out.println("The sum of odd numbers: " + sumOfOdds);
}
}
You may check out another question at:
https://brainly.com/question/24914609
Jim wants to shoot a video. This requires him to move from one place to another. Which type of camera support should Jim use?
Answer:
I think Jim should use a movement tracker camara
Explanation:
since he is moving around the camera would follow him around
Answer:
shoulder mount
Explanation:
What is the output?
answer = 0
for numB in [1,4]
for numA in [2,3]
answer = answer + numA + numB
print (answer)
Answer:
20
Explanation:
Answer:
its 20 edg 2021
Explanation:
Monica needs to assess the slide sequence and make quick changes to it. Which view should she use in presentation program?
Answer:
Slide Sorter View. Using the slide sorter view, Monica can view and change slide position that she prefer quickly. Slides are presented in series of 3 columns that she can drag and drop to a different position whichever she likes.
Explanation:
Which of the symbols below is present on the bottom row of the keyboard?
A.
apostrophe
B.
semicolon
C.
colon
D.
comma
Answer:
The correct answer is D: comma.
Explanation:
The comma is located on the bottom row of the keyboard to the right of the 'M' key.
The left and right margins of the page should always be the same.
True
False
Answer:true
Explanation:
Using database software, you can?
a. Add, change and delete data;
b. Sort and retrieve data;
c. Create forms and report;
d. All of the above.
Answer:
d
Explanation:
What is one benefit of using a web clipping tool?
It can be used to reuse text and images.
It has a drawing-to-notes feature.
It may provide a personal organizer.
It may have different alarm settings.
Answer:
the correct answer is A I took the quiz
Explanation:
Answer:
a
Explanation:
Which of the following was the primary purpose of muckraking, sensationalism, and yellow journalism in the early 1900s?
to improve literacy rates
to expose government corruption
to make a profit
to influence social reform
Answer:
C
Explanation:
Pinlee just opened a cafe and wants to set up a website that would allow local customers to order her desserts online. She told one of her friends that she needed a management information system. Why is Pinlee mistaken about what she needs?
Answer: C: Pinlee is mistaken because she really needs a transaction processing system to perform this task.
Explanation: I got it right on the CST Test
Answer:
Pinlee is mistaken because she really needs a transaction processing system to perform this task.
Explanation:
Someone please help will mark as brainliest
Answer:
The word is "short"
Explanation:
when you add the two letters "er" to "short" it becomes the word "shorter"
I hope this helps.
Answer:the word short?...
Explanation:
Can someone please help me?
Answer:
Im pretty sure its a
Explanation:
Write a couple of paragraphs about the usefulness of computer
Answer:
computer is an electronic device
Explanation:
computer have many advantages like
it help us to find answer questions
it helps us to employing
it gives some knowledge like how to play games
it help me to talk with friends
What is the value of the variable? (1 point)
double dNum =
(int) 38.78;
1) 38
2) 38.0
3) 38.78
4) 39
5) Error: incompatible types
What would this look like if you were to write the pseudocode but for c++?
Answer:
when make a task list you would not include commands that are for any specific language like C++
Explanation:
pseudocode should be universal. So when creating the task list, you would not include commands that are for any specific language like C++, java, C#, or perl. The point of pseudocode is to design a program that can be translated in to any language.
Which view is the default for contacts in Outlook 2016?
OBusiness Card
O Card
O Phone
O People
Answer:
people
Explanation:
Answer:
people
Explanation:
I got it right on the test
Amara created a workbook to track the number of minutes she reads each week. Each day, she entered the number of minutes into the workbook. Identify the types of data in the workbook using the drop-down menus. 25: 105: Wed:
Answer:
25: Value
105:Formula
Wed: Label
Explanation:
Answer:
C- Value
A- Formula
B- Label
Explanation:
A picture drawn in 3 d is called?
Answer:
autostereogram
Explanation:
that^
While reviewing a Web site about a medical condition your aunt was just diagnosed with, you decide to check on the writer of the site. You verify that the writer is a well-known doctor and is a frequent television expert on this medical condition. What characteristic of an effective Web site does this show?
reputable author
verified
unbiased
relevant
Answer:
This is a characteristic of a reputable author
In the context of website navigation, what is a node?
Answer:
a point at which the user chooses a certain path.
MacBook Pro (2019) at 93% max capacity battery rating after 100 charge cycles. Is this normal? Used coconut battery to check this.
Answer:
This is not a normal situation. Go to Apple Support!!!
1,000 battery cycles
Most current Macs (MacBooks, MacBook Airs, and MacBook Pros) use batteries assessed as having 1,000 battery cycles. That's pretty much good enough for at least three years of regular use.
Your battery might drain fast when you're working on your Mac because, for one reason or another, you're running one-too-many apps at the same time. ... To do this, simply click on the battery icon on the top right corner of your screen, or run the activity monitor app.
Use this website for more ways to fix your computer:
https://pdf.wondershare.com/macos-10-14/fix-battery-issue-on-macos-10-14.html
I say it depends if you got the computer at the beginning of the year. If you got it later in 2019, go to the apple store and ask.
An office uses an application to assign work to its staff members. The application uses a binary sequence to represent each of 100 staff members. What is the minimum number of bits needed to assign a unique bit sequence to each staff member?
A 5
B 6
C 7
D 8
Answer: I believe the answer is: A, 5.
Explanation:
The minimum number of bits required to assign a unique bit sequence is 7.
Binary numbers are represented as 0's and 1's
Let n = number of bits [tex] {2}^{n} = required \: sequence[/tex]Therefore,
[tex] {2}^{n} \geqslant 100[/tex]The whole number value of n, which is greater than or equal to 100;
[tex] {2}^{7} = 128[/tex]The value of n which satisfies the inequality is 7
Therefore, the minimum number of bits required is 7.
Learn more : https://brainly.com/question/20865548?referrer=searchResults
Match each field of engineering to its application.
Choose all items that represent characteristics of HTML attributes.
consist of a keyword (name) surrounded by angle brackets
used to include additional information in an element
may be required for certain elements
are added to an element's end tag
consist of a keyword followed by an equals sign and additional information in quotes
Answer:
B- used to include additional information in an element
C- may be required for certain elements
E- consist of a keyword followed by an equals sign and additional information in quotes
The attributes are:
Used to include additional information in an element.May be required for certain elements.Consist of a keyword followed by an equals sign and additional information in quotes.What are HTML attributes?An HTML attribute is known to be a kind of markup language piece that is often employed to move the behavior or show off an HTML element.
Note that The attributes are:
Used to include additional information in an element.May be required for certain elements.Consist of a keyword followed by an equals sign and additional information in quotes.Learn more about HTML attributes from
https://brainly.com/question/13153211
#SPJ9
PLEASE HELP ASAP!!!!!!!
Is this statement true or false?
You can apply only one of these at a time: underline, bold, or italics.
true
false
Answer:
i am pretty sure that is false
Explanation:
To supply the multiple audio formats, which element is repeated inside the element?
A.
B.
C.
D.
Answer:
No answers so you can't expect someone to know the answer.
Explanation:
Because it doesn't make sense.
Critical Thinking Questions
You learned that there are many different programming languages, just like there are many different spoken languages throughout the world. And programming languages have certain syntax, or rules, they have to follow in order for the computer to understand the commands. Give one example of syntax for one of the programming languages listed in the unit. Then give two examples of syntax from a language you know. Describe what will happen if you do not follow these rules in your language.
Answer:
One example of syntax in Logo is “[”. Two examples of Java are “;” and “{“or “}”. If you don’t use these parts of syntax then you could get a Syntax error, this will make you have to stop the code and debug.
Explanation:
Answer:
I am giving this answer so the other person can get brainliest
Explanation:
If your company increases its market penetration, what is happening?
A.
The target market is growing.
B.
More people in the target market are buying the company's product.
C.
The market saturation of the target market has decreased.
D.
Competitors who offer similar products are entering the market.
D.
Your company collects credit card information from customers.
Answer: (A, B, E)
A. ) The target market is growing.
B. ) More people in the target market are buying the company's product.
E. ) Your company collects credit card information from customers.
Explanation: Simply what was on the assignment. Correct on Edge.
I hope this helped!
Good luck <3
Answer:
a,b,e like the top one said
Explanation:
this is late but thats okay
WILL GIVE BRAINLIEST!!!!!!!
In a series circuit, electricity flows along more than one path.
True
False
wanna play pubg
ill send u my id
Answer:
Nah ill pass
Explanation:
because I don't have module data so I am very sorry