Results (
English) 1:
[Copy]Copied!
Chapter 3PASCAL English ver.A. Multiple choice1. Function is. ..b) Transformation mapping a result value to another valuec) a set of algorithms that only namedd) a set of algorithms that can not be usede) all wrong2. Procedure is. ..a) a set of algorithms that are named and can be called upon to work on something of an instructionb) a set of algorithms that only namedc) a set of algorithms that are named and can be called upon to stop a flyingd) a set of algorithms that can not be usede) all wrong3. Local variable is. ..a) variables can only be used for the algorithm on the function/procedure onlyb) variable that can be used both in the main program or function/procedurec) variables can only be used in the main programd) variables can only be used for the algorithm on the function/procedure othere) all wrong4. Global variable is. ..a) variables can only be used for the algorithm on the function/procedure onlyb) variable that can be used both in the main program or function/procedurec) variables can only be used in the main programd) variables can only be used for the algorithm on the function/procedure othere) all wrong5. The Parameters that provided while calling function or procedure, that is ...a factual Parameter)b normal Parameters)formal Parameter c)d) actual Parametere) Parameter global6. The Parameter that placed in header within function / procedure, that is …a) Parameter faktualb) Parameter normalc) Parameter formald) Parameter aktuale) Parameter globalProgram below, for the question no.7-10!Program coba;Varx,y1 : integer;function tambah2 (a,b:integer)3 : integer;begin tambah := a + b;end; BeginWrite(‘Masukkan angka pertama : ’); readln(x);Write(‘Masukkan angka kedua : ’); readln(y);Write(tambah(x,y)4);Readln;End.7. Algorithm text that underscore in number 1, that is...a) Parameter aktualb) Parameter faktualc) Variabel lokald) Varabel globale) Nama fungsi8. Algorithm text that underscore in number 2 that is ...a) Parameter aktualb) Parameter faktualc) Variabel lokald) Variabel globale) Nama fungsi9. Algorithm text that underscore in number 3 that is ...a) Parameter aktualb) Parameter faktualc) Variabel lokald) Variabel globale) Nama fungsi10. Algorithm text that underscore in number 4 that is ...a) Parameter aktualb) Parameter faktualc) Variabel lokald) Varabel globale) Nama fungsiB. Essay1. Describe the definition of function!Jawaban :Fungsi merupakan program yang memberikan/mengembalikan (return) sebuah nilai dari tipe tertentu2. Describe the definition of procedure!Jawaban :Sekumpulan algoritma yang diberi nama dan dapat dipanggil untuk mengerjakan sesuatu dari instruksi3. Mention and describe various parameters!Jawaban :• Input parameters; It is the only parameter that can be used as input function/procedure• Parameteroutput; is a parameter that can be used only as an output function/procedure• Input/output Parameters; is a parameter that can be used as input and output functions/procedures4. Please list and describe the difference between functions and procedures!Answer:• A declaration procedure starts with a ' Procedure '. While a declaration of a function begins with ' Function '.• The Output of the procedure are in the procedure itself. While the output of the function is in the main program.• The procedure does not return a value to the main program, so the calling procedure can be done by simply writing the name of the procedure. While the function will return the value to the program, so that the data type of the function must exist.5. Describe the definition of:a Local Variable) b) Global Variables c) Actual Parameters Formal Parameter d) Answer:a Local Variable); a variable can only be used on functions/procedures courseb) Global Variables; variables that can be used in the main program or function/procedurec the Actual Parameters); parameters supplied when calling the function/procedureFormal Parameter d); the parameter is placed in the header of the function/procedureC. Journal1. Make a BIOS programs using procedure!ExampleName: GanoolNIM: 100023456Age: 35program cobaprosedur;uses crt;var name, nim, age: string;procedure entry; begin clrscr; begin WriteLn (' Bio '); printf; begin WriteLn (' Name ', name); begin WriteLn (' NIM ', nim); begin WriteLn (' Age ', age); printf; end;begin clrscr; printf ("enter your bio-data '); printf; write (' Name '); readln (name); write (' NIM: '); readln (nim); write (': '); readln (aged); background information; readln;end.2. Make a BIOS program using function!Example Name: GanoolNIM: 100023456
Being translated, please wait..