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 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
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, 22.09.2019 01:20
question
Mathematics, 22.09.2019 01:20
Questions on the website: 13722362