reciprocals

C

curiousEngine

program to print out a list of reciprocal sums for every integer up to
and including the input value i.e. print out the sum of the
reciprocals of the integers up to and including 1, up to and including
2, up to and including 3 etc.,etc.

I don't understand the problem.
for eg. the number 4 is entered.
which sums should be computed?
 
R

red floyd

curiousEngine said:
program to print out a list of reciprocal sums for every integer up to
and including the input value i.e. print out the sum of the
reciprocals of the integers up to and including 1, up to and including
2, up to and including 3 etc.,etc.

I don't understand the problem.
for eg. the number 4 is entered.
which sums should be computed?

How should we know? Ask your instructor.
 
K

Kai-Uwe Bux

curiousEngine said:
program to print out a list of reciprocal sums for every integer up to
and including the input value i.e. print out the sum of the
reciprocals of the integers up to and including 1, up to and including
2, up to and including 3 etc.,etc.

I don't understand the problem.
for eg. the number 4 is entered.
which sums should be computed?

Taken literally, it would involve sums like this

1/4 + 1/3 + 1/2 +1/1 + 1/0 + 1/(-1) + 1/(-2) + ...

which does not make much sense. Presumably, are meant to print the numbers

1/1
1/1 + 1/2
1/1 + 1/2 + 1/3
1/1 + 1/2 + 1/3 +1/4


Best

Kai-Uwe Bux
 
D

Darwin

program to print out a list of reciprocal sums for every integer up to
and including the input value i.e. print out the sum of the
reciprocals of the integers up to and including 1, up to and including
2, up to and including 3 etc.,etc.

I don't understand the problem.
for eg. the number 4 is entered.
which sums should be computed?

(1/1) + (1/2) + (1/3) + (1/4) ... + (1/n)

I think

Hope that helps
 
R

red floyd

curiousEngine said:
program to print out a list of reciprocal sums for every integer up to
and including the input value i.e. print out the sum of the
reciprocals of the integers up to and including 1, up to and including
2, up to and including 3 etc.,etc.

I don't understand the problem.
for eg. the number 4 is entered.
which sums should be computed?

And what was your C++ language question? If you don't understand the
statement of your homework assignment, the person to ask is your
instructor, not a bunch of people elsewhere.
 
G

Guest

program to print out a list of reciprocal sums for every integer up to
and including the input value i.e. print out the sum of the
reciprocals of the integers up to and including 1, up to and including
2, up to and including 3 etc.,etc.

I don't understand the problem.
for eg. the number 4 is entered.
which sums should be computed?

If you do not understand the assignment ask your teacher.

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,200
Messages
2,571,046
Members
47,646
Latest member
xayaci5906

Latest Threads

Top