subject

Write a program to calculate the following series sum = 2 + 4 + 6 + 8 + 10 + 12 + 14 + + n, the user has to enter the value of n and n should be an even number, if n was entered as an odd number you should print a message "wrong input! ”, otherwise find the sum of the series. the output should be:enter an odd number for n: 12 sum = 2 + 4 + 6 + 8 + 10 + 12 = 42

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:00
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data.
Answers: 1
question
Computers and Technology, 21.06.2019 20:50
Write a method in the heapintpriorityqueue class called merge that accepts another heapintpriorityqueue as a parameter and adds all elements from the other queue into the current queue, maintaining proper heap order such that the elements will still come out in ascending order when they are removed. your code should not modify the queue passed in as a parameter. (recall that objects of the same class can access each other's private fields.)
Answers: 2
question
Computers and Technology, 22.06.2019 06:40
Match the personality traits with their description
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
You know the right answer?
Write a program to calculate the following series sum = 2 + 4 + 6 + 8 + 10 + 12 + 14 + + n, the us...
Questions
question
Mathematics, 20.09.2021 16:50
question
Mathematics, 20.09.2021 16:50
question
Mathematics, 20.09.2021 16:50
question
Mathematics, 20.09.2021 16:50
question
Mathematics, 20.09.2021 16:50
question
Biology, 20.09.2021 16:50