Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

有点疑问,关于stdio.h 和 iostream.h 的

Posted by zzningxp at 2005-06-01 20:03:20 on Problem 2350
这个题
用
#include <iostream>
#include <iomanip>
using namespace std;
......
   cout<<setiosflags(ios::fixed)<<setprecision(3);
   cout<<t/n*100<<'%'<<endl;
......
这个是可以AC的。
可是换成如下
#include <stdio.h>
......
    printf("%.3lf%\n",t/n*100);
......
就WA了 
不知道为什么 谁能帮助解答一下,
我还有好几道题是这样,当然在POJ上WA的程序贴到ZOJ上去是会AC的

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator