Introdução à programação
$UTXLWHWXUD *HQpULFD GH XP &RPSXWDGRU 0iTXLQD GH 9RQ 1HXPDQQ
'LDJUDPD FRQKHFLGR FRPR 0iTXLQD GH 9RQ 1HXPDQQ JUDQGH QRPH GD LQIRUPiWLFD
A finalidade de um computador é receber, armazenar e manipular dados, produzindo informação
0DV R FRPSXWDGRU e WUDEDOKDGRU ² 3RVVXL PXLWD HQHUJLD ² 7HP ERD PHPyULD 1mR WHP LQLFLDWLYD ² 1mR p LQGHSHQGHQWH ² 1mR p FULDWLYR
3UHFLVD UHFHEHU LQVWUXo}HV QRV PtQLPRV GHWDOKHV 3URJUDPDV GH &RPSXWDGRU
3URJUDPD GH &RPSXWDGRU VHTrQFLD GH LQVWUXo}HV FRHUHQWHV TXH GLULJHP D &38 QD H[HFXomR GH DOJXPD WDUHID
-1-
2 TXH p D /yJLFD" 2 XVR GD SDODYUD OyJLFD HVWi QRUPDOPHQWH UHODFLRQDGR j FRHUrQFLD 1RVVD UD]mR SRGH IXQFLRQDU GHVRUGHQDGDPHQWH 3RU LVVR D OyJLFD HVWXGD H HQVLQD D FRORFDU ´RUGHP QR SHQVDPHQWRµ $ JDYHWD HVWi IHFKDGD $ FDQHWD HVWi GHQWUR GD JDYHWD 3UHFLVDPRV SULPHLUR DEULU D JDYHWD 8WLOL]DQGR D OyJLFD $QDFOHWR p PDLV YHOKR TXH )HOLVEHUWR )HOLVEHUWR p PDLV YHOKR TXH 0DULYDOGR 3RUWDQWR $QDFOHWR p PDLV YHOKR TXH 0DULYDOGR 2 VLORJLVPR DUJXPHQWR FRPSRVWR GH GXDV SUHPLVVDV H XPD FRQFOXVmR LOXVWUD RXWUR REMHWLYR GD OyJLFD R HVWXGR GH WpFQLFDV GH IRUPDOL]DomR H GHGXomR TXH YHULILFDP D YDOLGDGH RX QmR GH XP DUJXPHQWR 1RV WUrV H[HPSORV DEDL[R TXDLV VmR YiOLGRV H TXDLV VmR LQYiOLGRV" 7RGR PDPtIHUR p XP DQLPDO 7RGR FDYDOR p XP PDPtIHUR 3RUWDQWR WRGR FDYDOR p XP DQLPDO 2 SLQKHLUR p YHUGH 2 SLQKHLUR p PRWRULVWD (QWmR R PRWRULVWD p YHUGH 7RGRV RV SHL[HV QDGDP 7RGRV RV SHL[HV WrP HVFDPDV /RJR WRGRV RV TXH WrP HVFDPDV QDGDP /yJLFD GH SURJUDPDomR 8VD D ´RUGHP GD UD]mRµ QD SURJUDPDomR GH FRPSXWDGRUHV REMHWLYDQGR D SURGXomR GH VROXo}HV ORJLFDPHQWH YiOLGDV FRHUHQWHV H GH TXDOLGDGH SDUD SUREOHPDV WDUHIDV TXH VH GHVHMD SURJUDPDU )DVHV GD SURJUDPDomR FRQVWUXomR GH XP SURJUDPD GH FRPSXWDGRU
-2-
$OJRULWPR ´$OJRULWPR p XPD VHTrQFLD GH SDVVRV TXH YLVD DWLQJLU XP REMHWLYR EHP GHILQLGR µ )25%(//21( 3RU TXH XVDU DOJRULWPRV" $ OyJLFD GD VROXomR ILFD UHSUHVHQWD GH IRUPD FODUD H R PDLV REMHWLYDPHQWH