0

bai toan tinh van toc quang duong

Bài toán tính giá trị biểu thức

Bài toán tính giá trị biểu thức

Kỹ thuật lập trình

... delete(s,i,pos( ’)’,s) -i+1; insert(numbertostr (Tinh_ gia_tri_bieu_thuc_khong_dau_ngoac(s1)),s,i); i:=pos( ’-’,s); end; Tinh_ gia_tri_bieu_thuc_khong_co_ngoac: =Tinh_ gia_tri_bieu_thuc_khong_dau_ngoac(s); ... end; end; until i>= length(s); Insert_ope:=s; end; Function Tinh_ gia_tri_bieu_thuc_khong_dau_ngoac(s:string) : real; var s:string; begin Tinh_ gia_tri_bieu_thuc_khong_dau_ngoac:= gtbt(insert_ope(s)); ... Function Numbertostr(r:real):string; var s:string; begin str(r:0:5,s); Numbertotr :=s; end; Function Tinh_ gia_tri_bieu_thuc_co_ngoac(s:string):real; begin i:=pos(’)’,s); while i>0 begin repeat dec(i);...
  • 3
  • 20,822
  • 41

Xem thêm