Daprogramebis safuZvlebi leqcia #1 2009-2010 sasw.w. I semestri Tsu asoc.prof. naTela arCvaZe Tsu asoc.prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.

Презентация:



Advertisements
Похожие презентации
Daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.
Advertisements

Daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.
Daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.
Object-Oriented Programming Ramzi Saifan Program Control Slides adapted from Steven Roehrig.
Virtual memory Linux. Ներածություն Kernel and user space work with virtual addresses (also called linear addresses) that are mapped to physical addresses.
Conditional Statements. Program control statements modify the order of statement execution. Statements in a C program normally executes from top to bottom,
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v Module Summary CEF must be running as a prerequisite to running MPLS on a Cisco router. Frame-mode.
Operator Overloading Customised behaviour of operators Chapter: 08 Lecture: 26 & 27 Date:
Data Types in C. A Data Type A data type is –A set of values AND –A set of operations on those values A data type is used to –Identify the type of a variable.
He deals the cards as a And those he never suspect He doesn't play for the he wins He doesn't play for He deals the cards to find The sacred geometry of.
WiseImage Open Architecture Lessons Mission Impossible.
Cisco Systems Switches - Catalyst 2960 | Enhanced Metafile.
1/27 Chapter 9: Template Functions And Template Classes.
Basic Input - Output. Output functions printf() – is a library function that displays information on-screen. The statement can display a simple text message.
Chalkboard Graphics Add your message here. E = m c².
© Luxoft Training 2013 Annotations. © Luxoft Training 2013 Java reflection / RTTI // given the name of a class, get a "Class" object that // has all info.
The Best of All Possible Worlds.. Цели урока: Развивающий аспект: развитие творческих способностей развитие творческих способностей учащихся; учащихся;
The Web The Internet. Level A2 Waystage Level A2 Waystage Listening (p.17) I can understand simple messages delivered at a relatively high speed (on every.
Comment on the following statement. Use the following plan: 1. make the introduction (state the problem) 2. express your point of view and give 2-3 arguments.
Написание личного письма Абсандзе М.А. Учитель английского языка МОУ « Гимназия им. Ю.А.Гарнаева»
Транксрипт:

daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc.prof. naTela arCvaZe Tsu asoc.prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo mecnierebaTa fakulteti, kompiuterul mecnierebaTa mimarTuleba

1. ras warmoadgens C ra aris programireba rogor muSaobs C rogor SeviswavloT C programebi-amocanis dasmidan Sesrulebamde programis Seqmna integrirebul garemoSi

ra aris programireba C enis ZiriTadi funqcia - programistsa da kompiuters Soris urTierTobis damyareba manqanuri enis instruqcia - 0 da 1 asembleri (instruqciebis krebuli) programa ( assembly language ) MOV A,47 1 ADD A,B HALT... igive programa manqanur enaze Targmna

rogor muSaobs C C-is popularobis mizezebi: moqniloba gadatanadoba kompiuteruli programa monacemebi (data)instruqciebi (instructions)

mexsierebis erTeuli - baiti (8 biti) monacemi-baitebis mimdevroba aRiweros monacemi int total /* angariSebis jami */ int balance[100] / * balansi 100 angariSisTvis */ struct rectangle { int width; /* marTkuTxedis sigane piqselebSi */ int height; /* marTkuTxedis simaRle piqselebSi */ color_type color /* marTkuTxedis feri */ fill-type fill; /* Sevsebis wesi */ }; monacemebi

instruqciebi miniWebis Setyobineba (assignment statement) area=(base * height)/2.0; /* samkuTxedis farTobis gamoTvla */ marTvis Setyobinebebi: pirobiTi ( if, switch) ganmeorebiTi ( while, for) funqciebi-Setyobinebebis jgufi funqciaTa jgufi–sawyisi faili (sourse file)

programebi-amocanis dasmidan Sesrulebamde maRali donis kodi kompileri instruqciebis krebulis ena asembleri saboloo kodi amkinZavi programa Sesrulebadi programa biblioTeka

programis Seqmna integrirebul garemoSi integrebul garemo (IDE) Seicavs teqstur redaqtors, sxvadasxva menius, marTvis Rilakebs da a.S. Dev-C++

2. stili ra aris stili komentarebi programis kodis wera: gavrcelebuli midgomebi kodis formatireba wanacvlebis saSualebiT sicxade da simartive

komentarebi /************************************************ * hello -- program to print out "Hello World". * * Not an especially earth-shattering program * * Author: Steve Oualline. * * * Purpose: Demonstration of a simple program. * * * Usage: * * Runs the program and the message appears. * *************************************************/ #include int main() { /* Tell the world hello */ printf("Hello World\n"); system (PAUSE); return (0); }

/******************************** ********************************* * gafrTxileba: es aris gamafrTxilebeli * * gzavnilis magaliTi, romelic * * programistis yuradRebas miiqcevs * ************************************ ***********************************/

/* > sxva, naklebad mniSvnelovani Setyobineba < */ /*>>>>>>>>>>>> mTavari seqciis saTauri <<<<<<<<<<<<<<< */ /******************************************************** * Cven viyenebT CarCoSi Casmul komentarebs programis * * seqciis dasawyisis aRniSvnisaTvis * ********************************************************/ /* *\ * es aris CarCos daxatvis sxva xerxi * \* */ /* * es aris seqciis dasawyisi * ^^^^ ^^ ^^^ ^^^^^^^^^ ^^ ^ ^^^^^^^ * Semdeg paragrafSi Cven avxsniT, ras warmoadgens seqcia * * da rogor muSaobs igi */ /* * saSualo donis komentari, romelic exeba programis * * momdevno ramodenime striqons. Tumca Cven ar gvaqvs msxvili Srifti, * Cven mainc SegviZlia **gamovyoT** sityvebi */ /* martivi komentari, romlebic exeba programis momdevno striqons*/

/************************************************** * programa gamoicnobs udris Tu ara ricxvi 5-s * * : * *************************************************/ #include /* standartuli Setana-gamotanis biblioTekis CarTva */ #include /* standartuli funqciebis biblioTekis CarTva */ int main() /* mTavari funqcia */ { int a ; /* ganacxadi mTel ricxvze */ a=5; /* a -sTvis 5-is miniWeba */ /* amorCeva: ricxvis 5-Tan Sedareba */ if( a == 5 ) /* Tu a udris 5-s, maSin */ { printf("Hello,\n"); /*ekranze gamoCndeba gzavnili Hello da*/ printf("a = 5\n"); /*Semdeg striqonSi gzavnili a = 5 */ } else /* Tu a ar udris 5-s, maSin */ { printf("I'm Program\n"); /*ekranze daibeWdeba I'm Program da */ printf("I know, a isnt 5\n"); /*Semdeg striqonSi: I know, a isnt 5*/ } system (PAUSE); /* ekranis gasaCereblad */ return 0; } kodis formatireba wanacvlebis saSualebiT

arsebobs wanacvlebis ori ZiriTadi stili. pirveli _ mokle formaa: int main() { int a; a=5; if( a == 5 ) { printf("Hello,\n"); printf("a = 5"); } else { printf("I'm Program\n"); printf("I know, a isnt 5"); } system (PAUSE); return 0; }

meore stili figurul frCxilebs calke striqonebze svams: int main() { int a; a=5; if( a == 5 ) { printf("Hello,\n"); printf("a = 5"); } else { printf("I'm Program\n"); printf("I know, a isnt 5"); } system (PAUSE); return 0; }

sicxade da simartive /* arcTu saukeTeso programa */ temp = x1; x1 = x2; x2 = temp; temp = y1; y1 = y2; y2 = temp;

/* * adgili gavucvaloT (swap) A da B- s */ /* X koordinatebis gacvla */ temp = x1; x1 = x2; x2 = temp; /* Y koordinatebis gacvla */ temp = y1; y1 = y2; y2 = temp;

programis daweris wesebi ecadeT, Tqvens programas ar hqondes rTuli logika. dayaviT calkeul procedurebad da SeamcireT sirTulis xarisxi grZel instruqciebs Tavi aarideT-programa ase ufro advili aRsaqmeli iqneba ecadeT Tqveni programa iyos rac SeiZleba martivi da naTeli