Ex 8) Draw a flowchart for a computer program that will receive numbers andoutput if they are divisible by 3 or not until a zero is entered. When a zero is entered, the program should output how many of the entered numbers were divisible by 3, then stop. IMPORTANT RESTRICTION: you are not allowed to divide the number by 3; therefore, you are not allowed to use the remainder operator (%) over 3 to verify through the remainder if the number is divisible by 3. You may use any other math trick you wish.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.2: Arrays Of Structures
Problem 3E
icon
Related questions
Question
Ex 8) Draw a flowchart for a computer program that will receive numbers andoutput if
they are divisible by 3 or not until a zero is entered. When a zero is entered, the
program should output how many of the entered numbers were divisible by 3, then
stop. IMPORTANT RESTRICTION: you are not allowed to divide the number by 3;
therefore, you are not allowed to use the remainder operator (%) over 3 to verify
through the remainder if the number is divisible by 3. You may use any other math
trick you wish.
Transcribed Image Text:Ex 8) Draw a flowchart for a computer program that will receive numbers andoutput if they are divisible by 3 or not until a zero is entered. When a zero is entered, the program should output how many of the entered numbers were divisible by 3, then stop. IMPORTANT RESTRICTION: you are not allowed to divide the number by 3; therefore, you are not allowed to use the remainder operator (%) over 3 to verify through the remainder if the number is divisible by 3. You may use any other math trick you wish.
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

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
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