Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:为什么还是错的?help me !!附程序In Reply To:为什么还是错的?help me !! Posted by:cancel at 2005-10-05 22:38:14 #include<iostream.h> void caculate(int f0,int f1,int f2) { int a,b,c,f3,f4,f5; c=f0; a=(f0-2*f1+f2)/2; b=(-3*f0+4*f1-f2)/2; f3=9*a+3*b+c; f4=16*a+4*b+c; f5=25*a+5*b+c; cout<<f3<<" "<<f4<<" "<<f5<<endl; } int main() { int f0,f1,f2,n; n=0; while(n<100) { cin>>f0>>f1>>f2; caculate(f0,f1,f2); n++; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator