i need to write a C++ program that reads a sequence of integers and saves it into an array. Your
program has to check whether each integer n in the sequence is perfect using a brute
force approach. That is, your program should use all possible divisors of n from 2 to n–1.
i really need help with this assignment...

First read this, then post your effort.

Then have a look at your classmate's thread. I'm sure you'll get plenty of suggestions there. You may even be able to steal his code. Then your prof can fail you both.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.