helloo;
i challenge all of the world programmers ;my question is;
"Write a program that print all of the real number between 0 and 1";
:)
:D
:P
chaleenge

Congratulations on (re)discovering the Cantor set. Can you supply a formal proof?

It's theoretically impossible for a computer with limited bit depth and memory to represent ALL real numbers in any specific interval.
Ergo, it is theoretically impossible to complete this challenge successfully.

Perhaps my level of sarcasm wasn't adequately represented in my reply. :)

Perhaps my level of sarcasm wasn't adequately represented in my reply. :)

you really think OP knows what a Cantor set is?

Well .. are there any real numbers between 0 and 1?I thought there were only rational numbers.

Real Numbers are uncountable, so you can't list all of the numbers.
A proof for this is usually, done by the Cantor's_diagonal_argument.

Writing out all the representable floats would be do-able (with a bit of outside the box trickery).

Well .. are there any real numbers between 0 and 1?I thought there were only rational numbers.

Effectively the same thing when talking computers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.