C++ Include include using namespace std; Question 2. [10 marks] In a given range [S..E] inclusive, report
Question:
C++
Include
include
using namespace std;
Question 2. [10 marks] In a given range [S..E] inclusive, report the number with the largest count of factors. S is guaranteed to be no greater than E. No range / error checking is needed. If there exists multiple numbers having the same factor count, report the smallest one. Example 1: (user input is underlined) Input range: 1 4 4 (explanation: 4 has three factors (1,2,4), 2 and 3 has two factors, 1 has one factor) Example 2: (user input is underlined) Input range: 1 3 2 (explanation: 2 has two factors (1,2), 3 also have two factors (1,3). Answer is 2 as it's smallest) Example 3: (user input is underlined) Input range: 10 30 24 Example 4: (user input is underlined) Input range: 7 7 7
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill