Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

int, float, for loop question

Status
Not open for further replies.

MisterClemens

Programmer
Feb 4, 2006
1
US
I am trying to write a program that satisfies these conditions:

Write a program that will find and output the smallest positive integer float value x for which the
Boolean expression
x == x + (1.0 / n)
is true for some positive int variable n.

However, i don't want anyone to write the program for me, i just want to understand what this program is asking, can someone please clarify this?
 
integer float value" is an oxymoron. Integers are whole numbers, while floating point numbers are fractional.

I'm not a math expert, but I can't see how that equation can ever be true. The only way it could be true is if n = 0, which it can't if the question states that n is a positive number.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top