Write the c++ code that does the following: 1. Prompts the user to enter an integer that is between 0 and 100. 2. Prints all numbers between 0 and the input integer that are divisible by both 2 AND 3. So if the user inputs 25, the code prints all integers between 0 and 25 that are divisible by both 2 and 3 (0 6 12 18 24)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.1: Function And Parameter Declarations
Problem 8E: (Numerical) a. Write a C++ program that accepts an integer argument and determines whether the...
icon
Related questions
Question

Write the c++ code that does the following:

1. Prompts the user to enter an integer that is between 0 and 100.

2. Prints all numbers between 0 and the input integer that are divisible by both 2 AND 3.

So if the user inputs 25, the code prints all integers between 0 and 25 that are divisible by both 2 and 3 (0 6 12 18 24)

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr