Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that inputs two integers from the user (we will refer to this as

ID: 3658581 • Letter: W

Question

Write a program that inputs two integers from the user (we will refer to this as x and y in the rest of the handout) and outputs all numbers between zero and the x counting by y. For example: input: x = 12 & y = 3 output: 0 3 6 9 12 example: input: x = 24 & y = 5 output: 0 5 10 15 20 Hints: 1. Remember to declare needed variable(s). How many variables do you need and of what type? 2. The problem statement is essentially asking you to follow the example above. What is the relationship between each number in the sequence and the next number? 3. You will need a while loop to generate the sequence of number and output them. What should be the loop condition if you want to stop after you have printed x?

Explanation / Answer

#include using namespace std; int main(){ int x,y; coutx; do{ couty; if(y>x) cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote