a simple problem about printf("%10.5f",f)

J

Jude

here is the source code:
#include<stdio.h>
int main()
{
float f;
scanf("%f",&f);
printf("The float is %10.5f\n",f);
return 0;

}


when I input 12345.11111,the output is 12345.11133.
what's wrong with it?
I compile it with vc++6.0.
 
K

Keith Thompson

Jude said:
here is the source code:
#include<stdio.h>
int main()
{
float f;
scanf("%f",&f);
printf("The float is %10.5f\n",f);
return 0;

}

See the followup I posted to the other copy of this question, posted
three minutes earlier.

Is there something about the Google interface that encourages this
kind of rapid re-posting?
 
K

Keith Thompson

Keith Thompson said:
See the followup I posted to the other copy of this question, posted
three minutes earlier.

Is there something about the Google interface that encourages this
kind of rapid re-posting?

I just noticed that your second posting corrected some errors in the
first (including one that I had pointed out in my followup).

In the future, if you need to correct an error, post a followup in the
same thread rather than starting a new one. If you tried to cancel
the first posting, be aware that cancelling an article rarely works.
 
A

Antonio Contreras

Keith said:
See the followup I posted to the other copy of this question, posted
three minutes earlier.

Is there something about the Google interface that encourages this
kind of rapid re-posting?

I suppose this is a rethoric question but anyway...

I think it has nothing to do with google's interface (which btw is not
that bad once you get to know how to use it). But it has to do with how
usenet works and how most people using google interface don't know
about it. After you post a message using google groups there appears a
screen saying "Your message will momentarily appear in <list of groups>
.. Click to continue." My guess is that most newcomers simply don't read
the message, and when they get back to the group and don't see their
brand new post the re-post it again.

Google groups had some glitches in the past (and still has some from
time to time) but there's nothing in it to encourage people to post the
same questions more than once.
 
J

Jude

I'm sorry .I thought that I had deleted the first post,and I couldn't
see it after deleting it.
In the options,I chose the del option and I remember clearly I choose
the option "Yes,remove it now".
why the first post comes again?
 
J

Jude

Now, I know the reason. Before I found my error and decided to delete
my post,you had posted your answers. I didn't refresh my page, so I
didn't know you had answerd my questions. As you see, the frist post
had been deleted.
whatever, thanks a lot.
 
C

CBFalconer

Jude said:
Now, I know the reason. Before I found my error and decided to delete
my post,you had posted your answers. I didn't refresh my page, so I
didn't know you had answerd my questions. As you see, the frist post
had been deleted.
whatever, thanks a lot.

No, we can't see. Google is not Usenet. Google is only a highly
flawed insipid interface to usenet. Most usenet users cannot see,
and may never have received, any previous messages. What you
deleted affects nothing. Every message should include adequate
context, and must stand entirely by itself. See my sig below and
the references therein. Then do your best to follow the long
established (30 years or so) usenet posting conventions.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 
D

Default User

Jude said:
Now, I know the reason. Before I found my error and decided to delete
my post,you had posted your answers. I didn't refresh my page, so I
didn't know you had answerd my questions. As you see, the frist post
had been deleted.
whatever, thanks a lot.

No, that's not the reason. I can still see both messages. The problem
is that you believe that this is a Google Group, and that all messages
reside in some central place where they can be "deleted". All you did
was remove it from the Google archives, it was still sent flashing
around the world to numerous usenet servers.

Also, read the information below.



Brian
 
J

Joe Wright

Jude said:
here is the source code:
#include<stdio.h>
int main()
{
float f;
scanf("%f",&f);
printf("The float is %10.5f\n",f);
return 0;

}


when I input 12345.11111,the output is 12345.11133.
what's wrong with it?
I compile it with vc++6.0.
The float doesn't have the precision you seem to require. All the data
in the float is "1.23451113e+04". A double "1.2345111110000000e+04" ?
 
K

Keith Thompson

Jude said:
Now, I know the reason. Before I found my error and decided to delete
my post,you had posted your answers. I didn't refresh my page, so I
didn't know you had answerd my questions. As you see, the frist post
had been deleted.
whatever, thanks a lot.

I don't know what Google's "delete" button does. My guess is that it
deletes it from Google's archive and sends a "cancel" message. A
"cancel" message is a control message that requests that a specified
message be deleted. It is effective only to the extent that (a) it
propagates to all the sites to which the original message propagated,
and (b) those sites choose to honor "cancel" messages. (Cancels have
been abused in the past, so some sites deliberately ignore them.)

It doesn't hurt to cancel a message that needs to be corrected, but
you should *not* assume that it will do any good. It's usually better
to leave it out there and post any corrections as a followup.

Google is giving you a distorted view of Usenet.
 
J

Jordan Abel

I don't know what Google's "delete" button does. My guess is that it
deletes it from Google's archive and sends a "cancel" message. A
"cancel" message is a control message that requests that a specified
message be deleted. It is effective only to the extent that (a) it
propagates to all the sites to which the original message propagated,
and (b) those sites choose to honor "cancel" messages. (Cancels have
been abused in the past, so some sites deliberately ignore them.)

It doesn't hurt to cancel a message that needs to be corrected, but
you should *not* assume that it will do any good. It's usually better
to leave it out there and post any corrections as a followup.

Google is giving you a distorted view of Usenet.

I read his statement as being that it was no longer on the main page of
the thread [i.e. you have to click to show older messages] - more
analogous to expiry than cancellation.
 

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
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top