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

我看了看pascal 但是不了解pascal的库和c/c++的区别 比如 下面这个程序 就compile error 哪位帮我看看

Posted by elysium at 2007-07-19 14:01:39
program pku3100;
uses math;

var
	a,b,m,n:int64;
	x,y,z:double;

begin
	while true do
	begin
		readln(a,b);

        if a=0 then break;

	   	x:=a;
    	y:=b;
		y:=1.0/y;
        writeln(y);
		z:=power(x,y);
        writeln(z);

		m:=floor(z);
		n:=m+1;
        writeln(m,' ',n);
		x:=power(m,b);
		y:=power(n,b);
        writeln(x,' ',y);
        z:=a;
		if abs(x-a)>abs(y-a) then
    			writeln(n)
	   	else
    			writeln(m);
	end;
end.


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