Introdução a Programação COM 100 Aula 08 Procedimentos.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

EXEMPLO DE REMOÇÃO ARVORE if (T = nil) then begin writeln ('ELEMENTO NAO ENCONTRADO NA ARVORE'); end else begin if (X.ch < T^.elem.ch) then.
Factor each trinomial:
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
Slide 1 Insert your own content. Slide 2 Insert your own content.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 28.
ALGEBRA Number Walls
Fractions VI Simplifying Fractions
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt Integer Addition Integer Subtraction.
Multiplication Facts Review. 6 x 4 = 24 5 x 5 = 25.
Reducing Fractions. Factor A number that is multiplied by another number to find a product. Factors of 24 are (1,2, 3, 4, 6, 8, 12, 24).
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
Multiplication LI: To be able to write number sentences to describe an array.
1 teddy bear has ears. 2 teddy bears have ears. 3 teddy bears have ears. 4 teddy bears have ears. 5 teddy bears have ears. 6 teddy bears have ears. 7 teddy.
EU market situation for eggs and poultry Management Committee 20 October 2011.
Huiswerkoplossings.  1) As x = -1 dan is y = -2(-1) – 8 = 2 – 8 = -6 As x = -2 dan is y = -2(-2) – 8 = 4 – 8 = -4 As x = -3 dan is y = -2(-3) – 8 = 6.
Created by Mr. Lafferty Maths Dept
E.g.9 For to do loop for i:=1 to 10 do writeln(i); While do loop i:=1;
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
 Depth Into the earth Surface of the earth Distance along the fault plane 100 km (60 miles) Slip on an earthquake fault START.
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
Rocket Math Subtracti on K PowerPoint created by Michelle Harding – Fairhope Elementary.
Addition 1’s to 20.
Test B, 100 Subtraction Facts
Doubles Facts Doubles with Pictures Doubles without Pictures Pictures Only.
Week 1.
Selection Process If … then … else.... Condition Process 2 Process 1 Y.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
PSSA Preparation.
MAIN BODY OF PROGRAM DECLARATION ACTION
Презентація за розділом “Гумористичні твори”
Центр атестації педагогічних працівників 2014
Галактики і квазари.
Характеристика ІНДІЇ.
Процюк Н.В. вчитель початкових класів Боярської ЗОШ І – ІІІ ст №4
ARRAY PADA PASCAL DOSEN : NURAINI PURWANDARI.
Духовні символи Голосіївського району
Práctica tRAZAS & Manejo de memoria. Pasaje de Parámetros Program parametros; var pa1, pa2: integer; procedure p(pf1: integer; var pf2: integer); var.
kbkjlj/m/lkiubljj'pl;
Проф. д-р Васил Цанов, Институт за икономически изследвания при БАН
ЗУТ ПРОЕКТ на Закон за изменение и допълнение на ЗУТ
О Б Щ И Н А С И Л И С Т Р А П р о е к т Б ю д ж е т г.
Електронни услуги на НАП
Боряна Георгиева – директор на
РАЙОНЕН СЪД - БУРГАС РАБОТНА СРЕЩА СЪС СЪДЕБНИТЕ ЗАСЕДАТЕЛИ ПРИ РАЙОНЕН СЪД – БУРГАС 21 ОКТОМВРИ 2016 г.
Сътрудничество между полицията и другите специалисти в България
Съобщение Ръководството на НУ “Христо Ботев“ – гр. Елин Пелин
НАЦИОНАЛНА АГЕНЦИЯ ЗА ПРИХОДИТЕ
ДОБРОВОЛЕН РЕЗЕРВ НА ВЪОРЪЖЕНИТЕ СИЛИ НА РЕПУБЛИКА БЪЛГАРИЯ
Съвременни софтуерни решения
ПО ПЧЕЛАРСТВО ЗА ТРИГОДИШНИЯ
от проучване на общественото мнение,
Програма за развитие на селските райони
ОПЕРАТИВНА ПРОГРАМА “АДМИНИСТРАТИВЕН КАПАЦИТЕТ”
БАЛИСТИКА НА ТЯЛО ПРИ СВОБОДНО ПАДАНЕ В ЗЕМНАТА АТМОСФЕРА
МЕДИЦИНСКИ УНИВЕРСИТЕТ – ПЛЕВЕН
Моето наследствено призвание
Правна кантора “Джингов, Гугински, Кючуков & Величков”
Безопасност на движението
Паскаль тілінің басқару
Қайталау операторлары
9 сынып 8 сабақ Сабақтың тақырыбы: Дейін циклі REPEAT операторы.
Presentation transcript:

Introdução a Programação COM 100 Aula 08 Procedimentos

Program Jurubeba_Tabajara; Var ; Procedure PROC_1 Procedure PROC_1 Begin End; Procedure PROC_2; Begin End; Procedure PROC_3; Procedure PROC_3; Begin End; Procedure PROC_4; Procedure PROC_4; Begin End; Procedure ImprimeMenu; Begin End;

BEGIN {Programam Principal} Opcao := ´0´ While (Opcao <> 5) Do Begin ImprimeMenu; realdln(Opcao); Case Opcao Of ´1´ : PROC_1; ´2´ : PROC_2; ´3´ : PROC_3; ´4´ : PROC_4; Else Writeln(´OPÇÃO INVÁLIDA – TECLE ALGO´); OPCAO := Readkey; end; {Case} end; {While} END.

Procedure ImprimeMenu; Begin ClrScr; GoToXY(33, 1); Write(´MENU PRINCIPAL´); GoToXY(28, 6); Write(´1 – Procedimento 1´); GoToXY(28, 8); Write (´2 – Procedimento 2´); GoToXY(28, 10); Write (´3 – Procedimento 3´); GoToXY(28, 12); Write (´4 – Procedimento 4´); GoToXY(28, 14); Write (´5 – Finalizar´); GoToXY(28, 18); Write (´ESCOLHA UMA OPÇÃO´); End;

Rotina Principal A, BProcedimento 1 A, XProcedimento 1.1 W Procedimento 1.2 Y Procedimento 2.1 X Procedimento 2 M

Passagem de Parâmetros – Por Valor Program Bussunda; Procedure Fatorial (N : Integer); Var i, Fat : Integer; Begin Fat := 1; For i := 1 to N Do Fat := Fat * i; Write(Fat); End; Var Nro; Begin Read(Nro); Fatorial (Nro); End.

Passagem de Parâmetros – Por Referência Program Fala_Serio; Procedure Fatorial (N : Integer, V ar Fat: integer); Var i : Integer; Begin Fat := 1; For i := 1 to N Do Fat := Fat * i; End; Var Nro, F; Begin Read(Nro); Fatorial (Nro,F); Write(F); End.

Program Ordena_Vetor; Var V : Array[1..10] of Integer; i, j : Integer; Procedure Ordena(Var A, B: Integer); Var X : Integer; BEGIN If (A > B) Then Begin X := A; A := B; B := X; End; END;

BEGIN {Programa Principal} {Leitura do Vetor} For i := 1 To 9 Do {Ordenação do Vetor} For j := i + 1 To 10 Do Ordena(V[ i ], V[ j ]); {Impressão do Vetor Ordenado} END.