Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Looping control structure is a programming control structure that allows a series of instructions to be executed more than once. (a) Identify which looping

image text in transcribed C++

Looping control structure is a programming control structure that allows a series of instructions to be executed more than once. (a) Identify which looping techniques is most suitable for the given situation: i. If you know or can determine in advance the number of repetitions needed. (2 marks) ii. If you do not know and cannot determine in advance the number of repetitions needed, and it could be zero. (2 marks) iii. If you do not know and cannot determine in advance the number of repetitions needed, and it is at least one. (2 marks) (b) By using for loop, write a program to receive input for any 5 numbers and display the total of even (not including 0) and odd numbers. The output should be as in Figure 1. (14 marks) Enter any 5 numbers: 01 3 2 11 O is not even number. Total exists (EUEN): 1 Total exists (ODD): 3 Press any key to continue Figure 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago