代码大全
else if((C&&!A&&!B)) Class=3; else Class=0; * define classTable * Static int class Table [2][2][2]=; /* !B!C !BC ...
28-1 Basic for i=1 to 100 x(i)=0 next i i Basic , Basic for i%=1 to 100 x(i%) 0 next i% Basic Fortran Basic 5.54 0.94 83 6:1 For ...
Pascal 6.64 4.55 32% 4:3 C 7.57 5.71 25% 5:4 C++ 4.29 7.69 -79% 1:2 Pascal C C++ C++ C++ NumRows * NumCols Entry Entry Entry Ent ...
Rate[RateIdx]=Rate[RatIdx]*ThisDiscount; } } C 16.09 13.51 16 C++ 15.16 15.16 0 Basic 31.09 21.37 31% 0 Pascal C 0 Pascal Pascal ...
Microsoft Windows font-proofing JonBentley 1000 500000 function Hypotenuse ( sideA:real; sideB:real ):real; begin Hypotenuse:=Sq ...
{compute new hypotenuse and cache it} cachedHypotenuse:=sqrt(sideAsideA+sideBsideB); cachesideA :=sideA; cachesideB :=sideB; Hyp ...
ax^2 + bx + c a b c x N Value=Coefficient(0) for power=l to order Value=(Value+Cofficient(power))*x^power next power Value=Coeff ...
PowerOfx Basic 25.43 3.24 1.98 39% Ada 28.72 11.42 6.97 39% 2 2 log(x)base = log(x)/log(base) unsigned int log2(unsigned int x) ...
log() log() log2 unsigned int log2(unsigned int x) { if(x<2) return(0); if(x<4) return(1); if(x<8) return(2); if(x<1 ...
C while 0.21 0.15 40% 25% x i x 5 i 3.14 x 3.14 i 5 : Basic 5.38 5.38 0% 1:1 Basic 15.27 6.42 58% 2:1 C 20.65 5.45 74% 4:1 C++ 4 ...
10 function ComputePayment ( LoanAmount :Longint; Months :integer; InterestRate :real; ):real; begin payment =LoanAmount/ ( (1.0 ...
Pasal 3.13 0.82 7 4 4 :l Ada 9.39 2.09 7 8 4 :1 function ComputePayments Months: integer; InterestRate real; real var LoanAmount ...
end; end; Pascal 3.51 0.77 7 8 5 :1 Ada 10.33 1.70 8 4 6 :1 payment =LoanAmount/ ( (l.0-Power(l.0+(InterestRate/12.0),-Months)) ...
Mtx[InsertPos-1] for Boundary 1,Boundary<NUM;Boundary { InsertPos=Boundary; TestVal=Mtx[InsetPos-1]; While(Insertpos 0&&a ...
{ SwapVal Mtx InsertPosj; Mtx[Insertpos] TestValPtr; TestValPtr SwapVal InsetPos--; TestValPtr--; } InsertPos 1 C 1.53 1.33 13 2 ...
29.6 1 100 2 3. 5 50 4. DES 50 H ASCll Pascal Pascal : proedure HexGrow ( var Source: ByteArray; var Target: WordArray num: Word ...
Pascal HexExpand PROC NEAR MOV BX,SP Mov CX,SS:[nx z] Mov SI,SS:[BX 8] MOV DI,SS[BX 4 ] XOR XX,AX EXPAND: MOV BX,AX MOV DL,DS[SI ...
28-1 if case if then else 29.8 ...
30.1 30.2 30.3 30.4 5 7 10.6 24 25 25 70 20 25 30.1 ...
—— 500 30.2 : 30. 3 Ed Yourdon 50 5 55 2 Gerald Werberg ...
«
19
20
21
22
23
24
25
26
27
28
»
Free download pdf