求助!
pascal吧
全部回复
仅看楼主
level 7
一个测运行时间的程序,有时候不管用。求大神看看(程序在2楼)
2015年06月07日 04点06分 1
level 7
uses crt,dos;
var
f:string;
t:real;
h,m,s,se:word;
h1,m1,s1,se1:word;
begin
readln(f);
swapvectors;
gettime(h1,m1,s1,se1);
exec(f,'');
gettime(h,m,s,se);
swapvectors;
h:=h-h1;
m:=m-m1;
s:=s-s1;
se:=se-se1;
t:=h*3600+m*60+s+se/1000;
write('time=',t,'s');
readln;
end.
2015年06月07日 04点06分 2
level 7
有没有问题
2015年06月07日 04点06分 3
level 7
我测试“斐波那契第n项'程序时,直接运行,输入负数会退出,用此程序调用,输入负数时也直接退出了,都没显示时间
2015年06月07日 04点06分 4
肯定的,负数无法运行.
2015年06月09日 05点06分
level 7
exec运行的程序结束之后不返回主程序吗?
2015年06月09日 06点06分 6
1