MAIN BODY OF PROGRAM DECLARATION ACTION

Slides:



Advertisements
Similar presentations
__________________________________________
Advertisements

#include void main() { float x = 1.66, y = 1.75; printf(%f%f,ceil(x), floor(y)); }
Objectives Knows and understand about another kind of flowchart’s symbols (looping) Have ability to create structured solution on simple problem(s) Have.
Modules Program is built out of components. Each component defines a set of logically related entities (strong internal coupling) A component has a public.
An Introduction to Hashing. By: Sara Kennedy Presented: November 1, 2002.
Program CheckPass; var TestScore, ExamScore : integer; FinalScore : real; Status : string; begin write(‘Enter the Test score:’); readln(Testscore); write(‘Enter.
Pascal By: Liane Tom. Outline o Background o Data types and Syntax o Procedures and Functions o Advantages o Disadvantages.
EXAMPLE 5 Rewrite a conditional statement in if-then form
 For Loops › for (variable set; condition; incremental or decrement){ // loop beginning › } // loop end  While loops › while (condition) { // beginning.
1 The CONST definition CONST Pi = , City = ‘New York’; Constant identifiers are used when you do not want the value of an identifier to change why.
Copyright 1999 by Larry Fuhrer. Pascal Programming Getting Started...
Comparing and ordering rational numbers
Arrays “Array, I'm bound array, 'cross the wide Missouri.” ‒ Old Programmer’s Folk Song © Copyright 2014, Fred McClurg All Rights Reserved.
Introduction to Pascal The Basics of Program writing.
Programming, an introduction to Pascal
Pascal Programming Written by Leung King Yung. Simple Program 1 begin end.
The great fast food survey 2012 Get ready to record your data!
CS241 PASCAL I - Control Structures1 PASCAL Control Structures Modified Slides of Philip Fees.
Pascal Programming George Boole, a 19 th Century mathematician, is created with true, false logic. A Boolean expression in Pascal will be true or false.
1 dimensional static Array Int[] a = new int[4]; A[0]A[1]A[2]A[3] Int[] b= new int[1]; B[0] Array is a list of variables having same name and same data.
Chapter 6. Character String Types It is one in which the values consists of sequences of characters. How to Define a variable contain a string? In a programming.
5 Day Forecast Mon Tues Wed Thu Fri.
Written by Al.So. Software solutions
The CONST definition CONST Pi = , City = ‘New York’;
GANTT CHARTS Example Example Example Example text Tasks Example 1
Mon – 2Tue – 3Wed – 4Thu - 5Fri - 6Sat - 7Sun - 8 Mon – 9Tue – 10Wed – 11Thu - 12Fri – 13Sat – 14Sun -15 Mon – 16Tue – 17Wed – 18Thu - 19Fri – 20Sat –
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER
به نام خداوند خورشید و ماه
البرمجة بلغة الفيجول بيسك ستوديو
البرمجة بلغة فيجول بيسك ستوديو
Comparing and Ordering Rational Numbers
MON TUE WED THU
GANTT CHARTS Example Text Text Here Text Here Text Here Text Here
1   1.テキストの入れ替え テキストを自由に入れ替えることができます。 フチなし全面印刷がおすすめです。 印刷のポイント.
JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER
January MON TUE WED THU FRI SAT SUN
January MON TUE WED THU FRI SAT SUN
2017 Jan Sun Mon Tue Wed Thu Fri Sat
kbkjlj/m/lkiubljj'pl;
January Sun Mon Tue Wed Thu Fri Sat
January MON TUE WED THU FRI SAT SUN
January MON TUE WED THU FRI SAT SUN
Jan Sun Mon Tue Wed Thu Fri Sat
2008 Calendar.
S M T W F S M T W F
January MON TUE WED THU FRI SAT SUN
Sun Mon Tue Wed Thu Fri Sat
Қайталау операторлары
9 сынып 8 сабақ Сабақтың тақырыбы: Дейін циклі REPEAT операторы.
January MON TUE WED THU FRI SAT SUN
JANUARY 1 Sun Mon Tue Wed Thu Fri Sat
Calendar
Calendar – 2010 (October, November & December)
January MON TUE WED THU FRI SAT SUN
JANUARY 1 Sun Mon Tue Wed Thu Fri Sat
Sun Mon Tue Wed Thu Fri Sat
Name: ______________________________
1/○~1/○ weekly schedule MON TUE WED THU FRI SAT SUN MEMO
January MON TUE WED THU FRI SAT SUN
S M T W F S M T W F
2016 | 10 OCT SUN MON TUE WED THU FRI SAT
Sun Mon Tue Wed Thu Fri Sat
JANUARY 1 Sun Mon Tue Wed Thu Fri Sat
1 January 2018 Sun Mon Tue Wed Thu Fri Sat
1 January MON TUE WED THU FRI SAT SUN MEMO 2 February MON TUE WED THU FRI SAT SUN.
2008 Calendar.
S M T W F S M T W F
S M T W F S M T W F
1 January MON TUE WED THU FRI SAT SUN MEMO 2 February MON TUE WED THU FRI SAT SUN.
Presentation transcript:

MAIN BODY OF PROGRAM DECLARATION ACTION PASCAL PROGRAMMING MAIN BODY OF PROGRAM DECLARATION ACTION

DECLARATIONS CONST TYPE VAR PROCEDURE FUNCTION

EXAMPLE Program Example; uses dos,crt; const A = 10; Book = ‘Kitap’; Good = true; Bad = false; MsgHelp =‘Yardım için F1 tuşu’; Days : array[1..7] of String[5] = (‘Mon’, ‘Tues’,’Wed’,’Thurs’,’Fri’,’Sat’,’Sun’);

type Isimler = array[1..100] of String[20]; Names = Isimler; SurNames = Isimler; Name = String[20]; ArrayValues = array[1..500] of Real; Student = Record Isim : Name; Soyad : Name; Age : Integer; end;

var Talebeler : Isimler; x,y : ArrayValues; B : array[1..200] of real; k : Notlar; B : array[1..200] of real; C : array[1..10] of char; Kelime : String[20];

program Alan; var A : Real; I : Integer; procedure ComputeArea(x,y:Real ; var Area : Real ; var N : Integer); begin Writeln(‘How many significant digits after decimal ?’); Read(N); Area := x * y; end; ComputeArea(5,5,A,I); Writeln(‘Area = ‘,A:3:I); end.

program Alan; var A : Real; I : Integer; procedure ComputeArea(x,y:Real); begin Writeln(‘How many significant digits after decimal ?’); Read(I); A := x * y; end; ComputeArea(5,5); Writeln(‘Area = ‘,A:3:I); end.

program Alan; uses unit1; begin ComputeArea(5,5); Writeln(‘Area = ‘,A:3:I); end.

unit unit1; interface var A : Real; I : Integer; procedure ComputeArea(x,y:Real); implementation procedure ComputeArea; begin Writeln(‘How many significant digits after decimal ?’); Read(I); A := x * y; end; end.

STATEMENTS SIMPLE STATEMENTS X := y * z + w/v -u; Name := ‘Demir’; STRUCTURED STATEMENTS SIMPLE STATEMENTS X := y * z + w/v -u; Name := ‘Demir’; Sentence := ‘ This is a sentence’; BunuYaz(‘This is a sentence’); Satir := Line(1);

STRUCTURED STATEMENTS IF <boolean expression> then begin statement1; statement2; true . end else statements; false end;

STRUCTURED STATEMENTS case <ennumerated expression> of {case 1} : begin end; {case2} : begin end else begin

while <bolean expression> do begin end; repeat until <boolean expression>;

for I :=n to m do begin end; this can also be from m to n where m>n