|
|
back to boardI am puzzled.... help me. Posted by liwx988 12 May 2009 22:25 my solution code : #include <stdio.h> void main() { double a,b,c; scanf("%lf%lf", &a, &b); c=a+b; printf("%f\n", c); } The result is: Wrong answer why? I don't know where the wrong ,please briefly tell me. THX! Edited by author 12.05.2009 22:34 use int instead of double Edited by author 16.05.2009 16:43 Re: I am puzzled.... help me. Posted by mk8 8 Jul 2009 17:03 Use int (not double) Re: I am puzzled.... help me. printf("%f\n", c); It should be %lf not %f because c is double not float |
|
|