perfect-numbers Questions
7
Solved
I coded up a program in C# to find perfect numbers within a certain range as part of a programming challenge . However, I realized it is very slow when calculating perfect numbers upwards of 10000....
Execration asked 16/4, 2010 at 8:25
4
Solved
I am looking for an algorithm to find if a given number is a perfect number.
The most simple that comes to my mind is :
Find all the factors of the number
Get the prime factors [except the numb...
Clod asked 4/7, 2011 at 2:33
3
Solved
Link : http://projecteuler.net/problem=23
A perfect number is a number for which the sum of its proper divisors
is exactly equal to the number. For example, the sum of the proper
divisors of 2...
Alphitomancy asked 21/4, 2013 at 5:47
4
the problem is :
"Write a function to find out if a number is a prime or perfect number."
so far i have worked on the perfect part first and this is what i have:
#include <iostream>
using n...
Schoolteacher asked 12/12, 2010 at 21:1
3
Solved
I've been working to optimize the Lucas-Lehmer primality test using C# code (yes I'm doing something with Mersenne primes to calculate perfect numbers. I was wondering it is possible with the curre...
Nightie asked 10/5, 2013 at 15:33
5
Solved
I did lab on perfect numbers in python it runs fine and prints numbers that I need. But not sure if I need to put (1, 1000) in range or (2, n+1) is fine? My instruction asking me to
"Write a pyth...
Calendula asked 14/9, 2012 at 20:52
4
Solved
I need to write a C program to find the Perfect Number..
main()
{
int n=1000,sum = 0;
for(int num = 1; num <= n; num++)
{
sum = 0;
for(int i = 1; i < num; i++)
{
if(!(num%i))
{
sum+...
Hassler asked 29/12, 2010 at 13:6
2
Solved
I am trying to optimize a small program which calculates perfect numbers from a given exponent.
The program runs (almost) perfectly, but when I open the task manager, it still runs on a single thr...
Ingroup asked 3/12, 2011 at 13:53
4
Solved
I am currently experimenting with F#. The articles found on the internet are helpful, but as a C# programmer, I sometimes run into situations where I thought my solution would help, but it did not ...
Laborsaving asked 2/12, 2011 at 12:57
5
Solved
I am doing a Introductory to Computer Science lab once a week. I was hoping to have a quick contest at the end of my next lab. I want to give them a block of code like this:
public class Ef...
Scab asked 23/1, 2011 at 2:13
1
© 2022 - 2024 — McMap. All rights reserved.