Zadatci sa ciklusima. Zadatak1: Sastaviti progra koji određuje z ir prvih prirod ih rojeva.

Similar documents
A L A BA M A L A W R E V IE W

OH BOY! Story. N a r r a t iv e a n d o bj e c t s th ea t e r Fo r a l l a g e s, fr o m th e a ge of 9

TEORIJA SKUPOVA Zadaci

Mathcad sa algoritmima

Th e E u r o p e a n M ig r a t io n N e t w o r k ( E M N )

CATAVASII LA NAȘTEREA DOMNULUI DUMNEZEU ȘI MÂNTUITORULUI NOSTRU, IISUS HRISTOS. CÂNTAREA I-A. Ήχος Πα. to os se e e na aș te e e slă ă ă vi i i i i

Table of C on t en t s Global Campus 21 in N umbe r s R e g ional Capac it y D e v e lopme nt in E-L e ar ning Structure a n d C o m p o n en ts R ea

Projektovanje paralelnih algoritama II

P a g e 5 1 of R e p o r t P B 4 / 0 9

c. What is the average rate of change of f on the interval [, ]? Answer: d. What is a local minimum value of f? Answer: 5 e. On what interval(s) is f

Le classeur à tampons

Ash Wednesday. First Introit thing. * Dómi- nos. di- di- nos, tú- ré- spi- Ps. ne. Dó- mi- Sál- vum. intra-vé-runt. Gló- ri-

Scripture quotations marked cev are from the Contemporary English Version, Copyright 1991, 1992, 1995 by American Bible Society. Used by permission.

T h e C S E T I P r o j e c t

Grain Reserves, Volatility and the WTO

S U E K E AY S S H A R O N T IM B E R W IN D M A R T Z -PA U L L IN. Carlisle Franklin Springboro. Clearcreek TWP. Middletown. Turtlecreek TWP.

Use precise language and domain-specific vocabulary to inform about or explain the topic. CCSS.ELA-LITERACY.WHST D

176 5 t h Fl oo r. 337 P o ly me r Ma te ri al s

Uvod u relacione baze podataka

I M P O R T A N T S A F E T Y I N S T R U C T I O N S W h e n u s i n g t h i s e l e c t r o n i c d e v i c e, b a s i c p r e c a u t i o n s s h o

P a g e 3 6 of R e p o r t P B 4 / 0 9

Red veze za benzen. Slika 1.

Provider Satisfaction

Executive Committee and Officers ( )

Rešenja zadataka za vežbu na relacionoj algebri i relacionom računu

The Periodic Table. Periodic Properties. Can you explain this graph? Valence Electrons. Valence Electrons. Paramagnetism

Nucleus. Electron Cloud

COMPILATION OF AUTOMATA FROM MORPHOLOGICAL TWO-LEVEL RULES

(C) Pavel Sedach and Prep101 1

Last 4 Digits of USC ID:

Lab Day and Time: Instructions. 1. Do not open the exam until you are told to start.

A new ThermicSol product

Alles Taylor & Duke, LLC Bob Wright, PE RECORD DRAWINGS. CPOW Mini-Ed Conf er ence Mar ch 27, 2015

Guide to the Extended Step-Pyramid Periodic Table

Software Process Models there are many process model s in th e li t e ra t u re, s om e a r e prescriptions and some are descriptions you need to mode

Solutions and Ions. Pure Substances

STEEL PIPE NIPPLE BLACK AND GALVANIZED

SPECIFICATION SHEET : WHSG4-UNV-T8-HB

LU N C H IN C LU D E D

gender mains treaming in Polis h practice

REFUGEE AND FORCED MIGRATION STUDIES

Lab Day and Time: Instructions. 1. Do not open the exam until you are told to start.

Element Cube Project (x2)

Use precise language and domain-specific vocabulary to inform about or explain the topic. CCSS.ELA-LITERACY.WHST D

M10/4/CHEMI/SPM/ENG/TZ2/XX+ CHEMISTRY. Wednesday 12 May 2010 (afternoon) 45 minutes INSTRUCTIONS TO CANDIDATES

8. Relax and do well.

Circle the letters only. NO ANSWERS in the Columns!

Results as of 30 September 2018

8. Relax and do well.

CLASS TEST GRADE 11. PHYSICAL SCIENCES: CHEMISTRY Test 4: Matter and materials 1

02/05/09 Last 4 Digits of USC ID: Dr. Jessica Parr

AIR CURTAINS VAZDU[NE ZAVESE V H

CHEM 107 (Spring-2004) Exam 2 (100 pts)

Beechwood Music Department Staff

8. Relax and do well.

Ch. 9 NOTES ~ Chemical Bonding NOTE: Vocabulary terms are in boldface and underlined. Supporting details are in italics.

ZANIMLJIVI ALGEBARSKI ZADACI SA BROJEM 2013 (Interesting algebraic problems with number 2013)

What Is Our Relationship with the Earth?

$%! & (, -3 / 0 4, 5 6/ 6 +7, 6 8 9/ 5 :/ 5 A BDC EF G H I EJ KL N G H I. ] ^ _ ` _ ^ a b=c o e f p a q i h f i a j k e i l _ ^ m=c n ^

Radiometric Dating (tap anywhere)

The exam must be written in ink. No calculators of any sort allowed. You have 2 hours to complete the exam. Periodic table 7 0

Atoms and the Periodic Table

8. Relax and do well.

5 questions, 3 points each, 15 points total possible. 26 Fe Cu Ni Co Pd Ag Ru 101.

NAME: FIRST EXAMINATION

CHEM 10113, Quiz 5 October 26, 2011

J A D A V PUR U N IV ERS IT Y K O LK AT A Fa cu lty of En gi n eer in g & T e ch no lo gy N O T I C E

Marks for each question are as indicated in [] brackets.

(please print) (1) (18) H IIA IIIA IVA VA VIA VIIA He (2) (13) (14) (15) (16) (17)

535.37(075.8) : /, ISBN (075.8) ISBN , 2008, 2008

INSTRUCTIONS: Exam III. November 10, 1999 Lab Section

STANDARDIZATION OF BLENDED NECTAR USING BANANA PSEUDOSTEM SAP AND MANGO PULP SANTOSH VIJAYBHAI PATEL

CHEM 251 (Fall-2003) Final Exam (100 pts)

Instructions. 1. Do not open the exam until you are told to start.

CHM 101 PRACTICE TEST 1 Page 1 of 4

MANY ELECTRON ATOMS Chapter 15

K owi g yourself is the begi i g of all wisdo.

Speed of light c = m/s. x n e a x d x = 1. 2 n+1 a n π a. He Li Ne Na Ar K Ni 58.

If anything confuses you or is not clear, raise your hand and ask!

Faculty of Natural and Agricultural Sciences Chemistry Department. Semester Test 1. Analytical Chemistry CMY 283. Time: 120 min Marks: 100 Pages: 6

Fall / Winter Multi - Media Campaign

30 Zn(s) 45 Rh. Pd(s) Ag(s) Cd(s) In(s) Sn(s) white. 77 Ir. Pt(s) Au. Hg(l) Tl. 109 Mt. 111 Uuu. 112 Uub. 110 Uun. 65 Tb. 62 Sm. 64 Gd. 63 Eu.

M11/4/CHEMI/SPM/ENG/TZ2/XX CHEMISTRY STANDARD LEVEL PAPER 1. Monday 9 May 2011 (afternoon) 45 minutes INSTRUCTIONS TO CANDIDATES

Lab Day and Time: Instructions. 1. Do not open the exam until you are told to start.

I N A C O M P L E X W O R L D

Modified from: Larry Scheffler Lincoln High School IB Chemistry 1-2.1

Secondary Support Pack. be introduced to some of the different elements within the periodic table;

8. Relax and do well.

C o r p o r a t e l i f e i n A n c i e n t I n d i a e x p r e s s e d i t s e l f

Chemistry 431 Practice Final Exam Fall Hours

Chapter 3: Stoichiometry

9/20/2017. Elements are Pure Substances that cannot be broken down into simpler substances by chemical change (contain Only One Type of Atom)

PART 1 Introduction to Theory of Solids

I/O7 I/O6 GND I/O5 I/O4. Pin Con fig u ra tion Pin Con fig u ra tion

The Periodic Table of Elements

610B Final Exam Cover Page

M09/4/CHEMI/HPM/ENG/TZ2/XX+ CHEMISTRY. Monday 18 May 2009 (afternoon) 1 hour INSTRUCTIONS TO CANDIDATES

CHEM 130 Exp. 8: Molecular Models

Metallurgical Chemistry. An Audio Course for Students

Transcription:

Zadatci sa ciklusima Zadatak1: Sastaviti progra koji određuje z ir prvih prirod ih rojeva. StrToIntDef(tekst,broj) - funkcija kojom se tekst pretvara u ceo broj s tim da je uvedena automatska kontrola ispra osti u osa, tj. ako u eti tekst e ože da se pret ori u eo roj jer sadrži eki karakter koji ije ifra ili je praza kao red ost fu k ije uzi a se zadati roj kao predefi isa a red ost, ajčešće se uzi a ili, ali to nije obavezno). StrToFloatDef(tekst,broj) - funkcija koja tekst napisa u editu pret ara u reala roj, pri če u s e apo e e i s a ogra iče ja po e uta kod fu k ije StrToI tdef aže i o de. Napraviti formu kao na slici var n,i,s:integer; n:=strtointdef(edit1.text,100); For i:=1 to n do s:=s+i;

Zadatak2: Sastaviti progra koji određuje z ir prvih par ih rojeva. Razlika iz eđu o og i prethod og zadataka je sa o u to e što će o o de redo sa irati roje e po ože e sa 2 da bi bili parni. Napraviti formu kao na slici var n,s,i:integer; For i:=1 to n do s:=s+2*i; Napisaće o sada drugu pro eduru po oću ared i hile i repeat : var n,s:integer; // If n<1 then n:=1 ko trola je eophod a z og počet e red osti sume s:=2*n; While n>1 do s:=s+2*n; var n,s:integer; If n<1 then n:=1; // ko trola je eophod a z og počet e red osti sume s:=2*n; Repeat s:=s+2*n; Until n<=1;

Zadatak3: Sastaviti progra koji određuje faktorijel roja. For ula za izraču a a je faktorijela: faktorijel = * * *... *. Počet a red ost proiz oda ože iti ili sa taj roj (a ne sme iti z og ože ja jer i u to slučaju faktorijel io u ek, za is o od ared e iklusa. Po defi i iji faktorijel roja je, pa i o to e tre a oditi raču a. Kod testira ja progra a tre a oditi raču a o gra i i elih roje a, pa tre a u eti < 8. Gra i a se ože pomeriti ako u esto elih koristi o real u pro e lji u f, ali e pre iše, jer faktorijel pre rzo raste i prelazi s a ogra iče ja a raču aru. var n,f,i:integer; f:=1; For i:=2 to n do f:=f*i; Edit2.Text:=IntToStr(f); Napisaće o drugu pro eduru po oću ared i repeat i hile: var n,f:integer; f:=1; Repeat f:=f*n; Until n<1; Edit2.Text:=IntToStr(f); var n,f:integer; f:=1; While n>1 do f:=f*n; Edit2.Text:=IntToStr(f);

Zadatak4: Sastaviti progra koji određuje -ti stepen broja a. Stepe o a je roja elo roj i ekspo e to ije išta drugo do proiz oda, pa reše je o og zadatka liči a faktorijel s ti što je či ila ko sta ta - osnova stepena: stepen = a * a * a *... * a. Najpre će o kreirati for u kao a sli i stepe a do ija se ko i o a je d e la ele, a jed oj piše a, a druga je pro id a i a joj piše, druga la ela je sa sit iji fo to, alo podig uta i po ere a a des o, a zati apisati ko pleta progra : var n,i:integer; a,s:real; a:=strtofloatdef(edit2.text,1); Edit2.Text:=FloatToStr(a); s:=1; For i:=1 to n do s:=s*a; Edit3.Text:=FloatToStr(s); Edit2.ReadOnly:=true; Napisaće o o u pro eduru po oću repeat ada je razlika sa o for al e prirode, ali i a o i dodata pro le, tre a iz rša ati ciklus samo ako je ekspo e t eći od, o o je kod iklusa for ilo siste ski reše o, pa o to e is o orali da ri e o i po oću aredbe while (gde razlike gotovo da i nema): var n:integer; b,s:real; b:=strtofloatdef(edit2.text,1); Edit2.Text:=FloatToStr(b); s:=1; If n>0 then // ko trola je o avez a z og ači a izvršava ja iklusa Repeat s:=s*b; Until n<1; Edit3.Text:=FloatToStr(s); Edit2.ReadOnly:=true; var n:integer; b,s:real; b:=strtofloatdef(edit2.text,1); Edit2.Text:=FloatToStr(b); s:=1; While n>0 do s:=s*b; Edit3.Text:=FloatToStr(s); Edit2.ReadOnly:=true;

Zadatak5: 3. Sastaviti progra koji izraču ava z ir prirod ih rojeva iz eđu i, gde su i eli pozitiv i brojevi. var m,n,s,i:integer; m:=strtointdef(edit1.text,1); Edit1.Text:=IntToStr(m); n:=strtointdef(edit2.text,2); Edit2.Text:=IntToStr(n); If m>n then s:=m; m:=n; n:=s; For i:=m to n do s:=s+i; Edit3.Text:=IntToStr(s); Edit2.ReadOnly:=true; do aći: Napisati drugu pro eduru po oću ared i repeat i hile:

Zadatak6: Sastaviti progra koji izraču ava z ir kvadrata par ih i z ir ku ova epar ih rojeva iz eđu i n, gde su m i n celi pozitivni brojevi. Za razliku od prethodnog zadatka, o de će o i ati d e pro enljive koje predsta ljaju rezultat. Počet a red ost će za obe biti 0, a u iklusu će se testirati da li je broj paran ili neparan i u za is osti od toga će se određi ati z ir. Najpre će o kreirati formu kao na slici, a zatim napisati kompletan program: var m,n,p,q,i:integer; m:=strtointdef(edit1.text,1); Edit1.Text:=IntToStr(m); n:=strtointdef(edit2.text,1); Edit2.Text:=IntToStr(n); If m>n then s:=m; m:=n; n:=s; p:=0; q:=0; For i:=m to n do If Odd(i) then q:=q+i*i*i else p:=p+i*i; Edit3.Text:=IntToStr(p); Edit4.Text:=IntToStr(q); Edit2.ReadOnly:=true; Edit4.Clear; Zadatak7: Sastaviti progra koji izraču ava z ir re iproč ih vred osti rojeva iz eđu m i n, gde su m i n celi pozitivni brojevi. Pošto tre a sa irati re iproč e red osti, jas o je da je su a realan broj. Dalje je lako. Treba namestiti da prvi broj bude manji, a zatim, redom, sabirati reciproč e roje e od pr og do drugog. Najpre će o kreirati for u kao na slici, a zatim napisati kompletan program:

var m,n,i:integer; s:real; m:=abs(strtointdef(edit1.text,1)); n:=abs(strtointdef(edit2.text,1)); If m>n then s:=m; m:=n; n:=s; If m=0 // isključuje o oguć ost delje ja ulo then m:=1; Edit1.Text:=IntToStr(m); Edit2.Text:=IntToStr(n); For i:=m to n do s:=s+1/i; Edit3.Text:=Format('%15.13f',[s]); Edit2.ReadOnly:=true;