Code in C++ Language Print first those numbers that are divisible by three but not divisible by 5. I just hate 5. After doing that, print those other numbers that are divisible by three that we chose to leave out. Then print all the other numbers that are not divisible by 5. Lastly, place all those numbers left at the last. Ha, serves you right, five! Input: The first number represents the count of numbers in the array. The succeeding inputs are the numbers from ranging from 1 to 100. INPUT: 5 40 36 15 9 22 Output: The newly-arranged numbers as stated in the definition, separated by new lines. The first to appear in that category shall also be printed first. OUTPUT: 36 9 15 22 40

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Code in C++ Language

Print first those numbers that are divisible by three but not divisible by 5. I just hate 5. After doing that, print those other numbers that are divisible by three that we chose to leave out. Then print all the other numbers that are not divisible by 5. Lastly, place all those numbers left at the last. Ha, serves you right, five!

Input:

The first number represents the count of numbers in the array. The succeeding inputs are the numbers from ranging from 1 to 100.

INPUT: 5 40 36 15 9 22

Output:

The newly-arranged numbers as stated in the definition, separated by new lines. The first to appear in that category shall also be printed first.

OUTPUT: 36 9 15 22 40
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
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++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning