Question: Write a program that prompts the user to enter an integer. Your program should contain a counter based loop starting at 0 and ending at

Write a program that prompts the user to enter an integer. Your program should contain a counter based loop starting at 0 and ending at the value the user typed in, counting by 2's. It should print out the value of the loop counter each time through the loop. If the user enters a value less than 0 no output should be generated. See the sample runs for more detail user input is in bold italics: Sample run 1 Enter a value:6 Sample run 2 Enter a value: 3 Sample run 3: Enter a value:-4 YOUR ANSWER We recommend you take a quick tour of our editor before you proceed. The timer will pause up to 90 seconds for the tour. Start tour For help on how to read input and write output in C++, click here Original Code C 1-#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
