Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ code only please. I asked this before and the answer was close but didnt meet all requirements. I am stuck on some parts so
C++ code only please.
I asked this before and the answer was close but didnt meet all requirements. I am stuck on some parts so comments would help too.
CSE 232 Fall 2017 Programming Project 02 This assignment is worth 10 points and must be completed and turned in before 11:59 on Monday., September 18th, 2017. Assignment Overview This assignment will exercise your ability to utilize control statements (while, for, if) for C++ Background We are going to look at highly composite numbers https://en.wikipedia.org/wiki/Highly composite number. A highly composite number is calculated in the following way. For the positive integer n . We calculate the count of divisors, numbers that divide evenly into n without remainder We also calculate the count of divisors for every number from 1 to n-1 We say that n is highly composite if it has a count of divisors greater than the count of divisors of * any of the integers 1 to n-1 The Wikipedia page gives a list of highly composite numbers of different orders. The order of the numbers lists the next element in the sequence of integers that increases its count of divisors. The column d(n) gives the count of divisors For example, 12 is a highly composite number. Its divisors are: 1, 2, 3, 4, 6, 12. It has the order 5 (5th in the series from 1 that increase its divisor count). No number 1-11 has the same or more divisors than 12 Another example, 20 is not highly composite. It has as its divisors 1, 2, 4, 5, 10, 20. The first number from 1 to 20 that has 6 divisors is the number 12, as we just saw Project Description / Specification Input: Input is a single, positive integer that is 1 or greater Output for each test case will be: If the input is 0 or less, then the word "Error" is printed and processing ends If no error, then you must determine if the input is highly composite If it is highly composite, print "True", a space, the input number, a space, and the count of divisors. For 12, the output would be True 12 6 on a single line If it is not highly composite, print "False", a space, the input number, a space, the first number in the sequence 1 to input that has the same number of divisors, a space, and the count of the smaller number's divisors. For 20, the output would be False 20 12 6 on a single line. 20 has 6 divisors (1, 2, 4, 5, 10, 20) but 12 was the first number in the sequence 1 to 20 with 6 divisors o oStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started