csc101

4
Name: Sum 5 Line N1 N2 Given: N1,N2,N3,N4,N5 1 1 results: Total 2 3 definition : total= sum5(N1,N2,N3,N4,N5) 3 Get N1 4 Get N2 5 Get N3 6 Get N4 7 output:25 Get N5 Let total = N1 +N2+N3+N4+N5 give total : Name: Sum 5 Line N1 N2 Given: N1,N2,N3,N4,N5 1 1 results: Total 2 3 definition : total= sum5(N1,N2,N3,N4,N5) 3 Get N1 4 Get N2 5 Get N3 6 Get N4 7 Get N5 8 output:25 Let total = N1+N2+N3+N4+N5 9 output:5 Let average = sum/5 give total give average Name: product 3 Line N1 N2 given: N1,N2,N3 1 2 results : total 2 9 definition:total= multiply(N1,N2,N3) 3 Get N1 4 Get N2 5 output:108 Get N3 Let total = total = N1 X N2 X N3 Give total : Name: Div/Mul Line X Y Given: X,Y 1 2 results: quotient 2 9 definition: quotient= multiply(x) x (y) 3 divide [ (x) x (y)] /6 4 Give multiply : 5 output:18 Give division: 6 output:3 Name: Calc Mark Line A1 A2 Given A1 ,A2.A3 1 15 results: mark 2 20 definition: mark = calmark(A1,A2,A3) 3

description

:D

Transcript of csc101

Sheet1Name: Sum 5 LineN1N2N3N4N5SumGiven: N1,N2,N3,N4,N511results: Total23definition : total= sum5(N1,N2,N3,N4,N5)35Get N147Get N259Get N3625Get N47output:25Get N5Let total = N1 +N2+N3+N4+N5give total : Name: Sum 5 LineN1N2N3N4N5sum AvgGiven: N1,N2,N3,N4,N511results: Total23definition : total= sum5(N1,N2,N3,N4,N5)35Get N147Get N259Get N3625Get N475Get N58output:25Let total = N1+N2+N3+N4+N59output:5Let average = sum/5give totalgive average Name: product 3LineN1N2N3 Productgiven: N1,N2,N3 12results : total29definition:total= multiply(N1,N2,N3)36Get N14108Get N25output:108Get N3 Let total = total = N1 X N2 X N3Give total :Name: Div/MulLineXYmultiply divideGiven: X,Y 12results: quotient29definition: quotient= multiply(x) x (y) 318divide [ (x) x (y)] /6 43Give multiply :5output:18Give division: 6output:3 Name: Calc MarkLineA1A2A3sum markGiven A1 ,A2.A3 115results: mark220definition: mark = calmark(A1,A2,A3)310set max mark:60445Get A1575Get A26output:75Get A3 Let total= A1+A2+A3Let mark= total /max mark x 100Give markName:SumDigLineNlet tenslet onessumGiven: N1659Results: sum265definition:sumdig(N)39Let tens : N div 10474Let ones: N mod 105output:74Let sum = tens + onesgive sumName: swapLineXY temp xtemp ygiven: x,y 18results: temp(x,y)29definition: swap (x,y)39get x48get y5output:9let temp = x6output:8let temp= ygive x =give y = Name: add wxyzLinewxyzsumgiven: w,x,y,z12results : x23definition add wxyz(w,x,y,z)34get w45get x514get y6output:14 get zlet= w+x+y+zgive x :

Sheet2

Sheet3