Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sugaragga

@sugaragga
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • my homework-amicable numbers
    S sugaragga

    how can I insert these informations: "Number of amicable number less than 1000 is 1." "Number of amicable number less than 10000 is 5." like this: "220 and 284 are amicable numbers. Number of amicable number less than 1000 is 1. 1184 and 1210 are amicable numbers. 2620 and 2924 are amicable numbers. 5020 and 5564 are amicable numbers. 6232 and 6368 are amicable numbers. Number of amicable number less than 10000 is 5." . I can only write these numbers like: 220 284 1184 1210 2620 2924 5020 5564 6232 6368 .... .... Please help me:((

    C / C++ / MFC c++ css help tutorial

  • my homework-amicable numbers
    S sugaragga

    I cannot do it by myself.I found these codes in this site but it has an array like int get_sumf(int val).We are not allowed to do that.How can I do it without ant array??? #include #define MAX 10000000000 int get_sumf(int val) { int sum = 1; int k; for (k = 2; k <= val / 2; ++k) if (val % k == 0) sum += k; return sum; } int main() { int i, k; for (i = 2; i < MAX; ++i) { int val = get_sumf(i); for (k = 0; k < i; ++k) if (val == k && get_sumf(k) == i) printf("%d %d\n", i, k); } return 0; }

    C / C++ / MFC c++ css help tutorial

  • my homework-amicable numbers
    S sugaragga

    Hi I have a homework about finding amicable numbers [[[[ Amicable numbers:Two numbers are called Amicable(or friendly)if each equals to the sum of the aliquot divisors of the other.Aliquot divisors mean all the divisors excluding the number itself. For example, aliquot divisors of number 220 are 1,2,4,5,10,11,20,22,44,55 and 110. The aliquot divisors of number 284 are 1,2,4,71 and 142. If we represent anamicable pair by(m,n)and sum of aliquot divisors of m and n by(m)and(n)respectively,then for amicable pair(220,284)we get (m)=(220)=1+2+4+5+10+11+20+22+44+55+110=284=n (n)=(284)=1+2+4+71+142=220=m ]]]] my teacher wanted this programs code in C++ without using any arrays(we are allowed to do this with if,while,for,do while).And also the program must be like this: 220 and 284 are amicable numbers. Number of amicable number less than 1000 is 1. 1184 and 1210 are amicable numbers. 2620 and 2924 are amicable numbers. 5020 and 5564 are amicable numbers. 6232 and 6368 are amicable numbers. Number of amicable number less than 10000 is 5. .... .... .... .... It must survive up to 10^10. Please help me,I will so appreciate...:((

    C / C++ / MFC c++ css help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups