Advertisement
Advertisement

More Related Content

Advertisement

More from Dimitris Psounis(20)

Recently uploaded(20)

Advertisement

ΠΛΗ10 ΜΑΘΗΜΑ 2.8 (ΕΚΤΥΠΩΣΗ)

  1. 10 2: 2.8: ! " #$ A. 1. 2. 3. ! " 4. ! ! ! " 5. # GOTO 6. $ % " !" #$% $ " . &' ' ' ' ' ' ' ' !" #$% $ % # & & ' $ ( $ . & & $ & ) $ & $ ' ' * " ( 1. ' $ " 2. & " $ $ 3. #& ! '$*$ 4. ! ! ' ! '$*$ 5. $ " GOTO 6. + , ' *$ - $ $ & $' % # ' '$ $ . # ' $ & # C & $ $ & $ . * : $ & #$ , ' & $ & & . . 1. ' $ " (' ' ' ' ' ' ' ' !" #$% & * $ " & #$ $ & #$ $ ' *$ $ *$ & $: & '% $ *$ " ) $ ' " $ & # # & '% $ & " $ ' " $ & # # & '% & ' #(* x $ #$ y & '% $ x & '% ' ' & # # x $ ' ' & ) $ & $ ' ' ( . $ $ " # math.h C. SQRT(x) ABS(x) POW(x,y) LOG(x) CEIL(x)
  2. . 2. & " & $ $ )' ' ' ' ' ' ' ' !" #$% & & #$ switch: (n) O (n=1) /* */ (n=2) /* */ (n=3) /* */ … (n=10) /* */ ’ /* */ - . 3. #& ! '$*$ *' ' ' ' ' ' ' ' !" #$% " * $ #& '$*$ $ " *$ & $ '$ & . . . " $ % : " * $ #& " $ $ $" & " '$*$: - ' & . " $ $ " «.» ( ). - … DATE: day: INTEGER; month: INTEGER; year: INTEGER; DATE d; ! d.day:=11; d.month:=4; d.year:=1995; . 4. ! ! ' +' ' ' ' ' ' ' ' !" #$% / $ $ '$ , $ & & $ $ ," : " * . $ " '$*$: 0& ' $ $" $ " ^ ( #$ " * C) / & $ & . $" $ ' *$ '$*$ , $ " 5. " # : data: INTEGER; next: POINTER[" # ]; list: LIST OF " # ; new: POINTER[" # ]; ! -" # (new) new^.next:=NIL; list:=new; . 5. $ " GOTO ' ' ' ' ' ' ' ' !" #$% $ " GOTO %' $ ' & "$ . & ( $ & # $ $ & # ) $ & ' $ $ # . $ " ? GOTO " 3; " 1: (“GOTO”); GOTO " 5; " 2: (“ ”); GOTO " 4; " 3: (“ ”); GOTO " 2; " 4: (“! ”); GOTO " 1; " 5: …
  3. . 6. + , ' *$ ,' ' ' ' ' ' ' ' !" #$% , ' %' $ $ ' & '$ " $ $ & $ (& & $ $ $ " $ C) i,x,sum,N:INTEGER; zero,negative: EXCEPTION; ! sum:=0; i:=1 N # # (x); - (zero) (x=0); - (negative) (x<0); sum:=sum+x; - $ (zero) (“ % & '&() * !”); " - $ (negative) (“ +) , &% ,+ . & % & ' ) ,+..”); x:=-x; -
Advertisement