954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help me with "Math Library" Related coding =)

Hey, I am in a beginning C++/C# Class and we are jsut starting the Math LIbrary. I need to write a program that displays all perfect integers up to 100. I am required to write a boolean function, IsPerfect(), to use in the program. My problem is I was either absent or, you know, spaced out, during last chapters which were Classes and objects and Functions. I understand Functions basically, but I am confused with classes. Can someone please gimme some logic and some example code for this, and I can try to deceipher it, (Good practice for me =) ). Thank You!!!!!

shonenhype
Newbie Poster
4 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

I don't think you'll find anyone here that will provide you with code right from scatch without you showing any effort at all. Post what you think you should do (your code), and I'm sure you'll find lot's of help from that point.

Tight_Coder_Ex
Posting Whiz in Training
215 posts since Feb 2005
Reputation Points: 47
Solved Threads: 17
 
I don't think you'll find anyone here that will provide you with code right from scatch without you showing any effort at all. Post what you think you should do (your code), and I'm sure you'll find lot's of help from that point.

Its not that Im asking for the code of my program neede...I essentially asking for an example of how Math Library is used. I wrote my assignment as an exmaple of the type of Math Library functions I am working with.

shonenhype
Newbie Poster
4 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 
I need to write a program that displays all perfect integers up to 100. I am required to write a boolean function, IsPerfect(), to use in the program.

A definition of perfect numbers: a number whose value is the sum of its divisors.Its not that Im asking for the code of my program neede...I essentially asking for an example of how Math Library is used. I wrote my assignment as an exmaple of the type of Math Library functions I am working with.You don't needany library functions. You only need the % operator to tell you when a potential divisor is in fact a divisor because it evenly divides into the number. That plus a loop or two and the ability to calculate a sum ought to do. Take a stab at it.

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You