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, 22.06.2019 07:30
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How do i copy and paste equations and pictures like math graphs, to post on this site to get my questions answered?
Answers: 2
question
Computers and Technology, 24.06.2019 22:30
When can you access the bios setup utility?
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
Ashort circuit locator should be periodically run along the cords used in a shop to check for shorts and open circuits. a.)true b.)false
Answers: 2
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
Computers and Technology, 03.03.2021 23:20
question
Geography, 03.03.2021 23:20
question
Mathematics, 03.03.2021 23:20
Questions on the website: 13722360