Question: Need help c++ CSCI 2170 OLA2 Due: midnight March 3rd, Deadline: midnight March 5 In this open lab assignment, you will write two C++ programs

Need help c++
Need help c++ CSCI 2170 OLA2 Due: midnight March 3rd, Deadline: midnight

CSCI 2170 OLA2 Due: midnight March 3rd, Deadline: midnight March 5 In this open lab assignment, you will write two C++ programs for the following two problems. Problem 1: Write a C++ program, named perfect.cpp that displays all the perfect numbers that is between 0 and 10000 exclusive. A perfect number is such an integer: the sum of all its positive divisors (excludes the number itself) equals to the number itself. For example, number 6 is a perfect number. Its divisors are 1, 2, and 3. The sum of these divisors 1+2+3 equals to the number 6 itself. In the main function, one needs to write a while loop that loops through all the numbers from 1 to 9999. On each loop iteration, the program cheeks if that number is a perfect number. If it is perfect, display that number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!