suke ta suke, tuless jeeerk . . FOP oouuhhh FOP. .best ke kw? ? xD

2/04/2011

million thanks to pn.nur ayuni ^ ^

b4 aleq class 2 FEB 2011, miss da luangkan mse utk aja student yg tataw na wt blog niyyy.. even rmay yg da aleq, tp miss still na aja kmi.. kire miss OT tanpe gj la kann.. hahaha.. punye la tekun aq tgok miss aja, smpay nek juleng mte aq tgok miss aja lju gyle.. tp aq paam n finally aq bjaye wt blog niy.. tp yg pasal chap 1 & 2 tuhh aq tataw na wt cmne.. hentam jelaaa.. wt je ap yg aq blja mse kt class tuuuhh.. lw ade yg sala, tlg la tego ye kwn kwn.. hmm thanks again sbb miss da bg aq plihan na msok group mne.. hehe even aq tataw pape sal tht group tp lege la jugak cz aq da knl dorank n tw cre blja dorng cmne.. ta bp susa lw na discuss pape.. thanks ahli kumpulan kuuuuh sbb da accepted aq nye request na msok group kornk.. syg korunk lbey ((:

chapter two ..

Dlm bab niyyy plakk, blaja pasal C++.. yg aq paam C++ niy blaja pasal programming language ? coding.. dlu mse amek subject PCC 2 aq ad blaja coding gak.. utk wt website.. blja yg basic basic jerr.. tp dlm C++ niy laen lg.. cyesly aq ta bp na paam mse miss terang kn sal coding tuhh.. mcm bese, muke aq blurr.. huhu aq take note jelaaa.. niy la cth C++ yg miss aja utk crik area of circle.. wt bnde niy bdasarkn flow chart yg itew da wt..
 #include<iostream.h> //header
main( ) //start body
{ //open curly bracket
 //declare variable
float area;
float radius;
 //input 1
cout<<"Enter radius=";
cin>>radius;
 //fomula
area=3.14*radius*radius;
//output
cout<<"area="<<area;
return 0;
}//close curly bracket
 //end Body

Care nk wt dy sbnanye cm niyy :
1) ptme skly yg kite kne wat ialah tgok formula yg dy da bg tuuh..cth nye mcm kt ats yg aq da wt tuhh.. area utk circle is area=3.14*radius*radius

2) pastuh tgok kt formula tuh, crik ad bp byk variable name

3) pastuh declare variable

4) da siap declare variable, wt flow chart bdasarkan soklan yg dy bg (jgn sala simbol)
cth : start > read radius > area=3.14*radius*radius > print output > end

5) start wt coding.. ade beberape pkare yg sgt penting dlm coding niy.. antarenye :
= utk starting, jgn lupe nk wt #include<iostream.h> dlm 1st line
= 2nd line lak jgn lupe wt main()
= 3rd line jgn lupe wt {
= line pleng last jgn lupe wt }
= sume tentang flow chart kne tulis dlm body
= sume di tulis dlm hruf kcik
= xbole ade space except 4 the certain part mcm comment, declare variable and input&output yg ade dlm ("") nan return 0
=jgn lupe letak simbol ;

         + Comment
  • // = utk 1 baris coding
  • /* , */ = utk ksuluruhan coding / >1 baris coding
  • xkesa nk ltk space or nk rpt kn jer
+ Declare variable ( Start ) 
    DATA TYPEINTEGER
    IntegerInteger (o-9)
    FloatFloat (decimals)
    DoubleDouble (decimals)
    CharCharacter (a-z / A-Z)
    StringString (Sentences)
    ConstConstant (pi=3.142)
+ Input
           cout<<"________";
           cin>>variable_name_thae_had_declare ;

RULES :
  • Bjage2 nan ejaan, hruf bsr&hruf kcik
  • key in ekot soklan, lw dlm soklan bahasa melayu= xley suke suke ltx bm (kne sbijik mcm soklan)
  • dlm ( " " ) xkesa nk ltx space ke tanak
+ Output
         cout<<"______"<<variable_name_that_had_declared ;

chapter one ..

da settle pasal reg forum uh, miss bg notes utk chap 1&2.. bosan la tade buku, tp na wt cmne.. cosmo KEDEK..! btw, tnx miss cz da bg kami notes, so ta perlu la kami na g crik sndry.. hehe hmm pasal chap 1 tuuhh, kitorg blaja pasal Algorithm, Pseudocode, Flow Chart.. mcm bese, miss salu aja laju.. ta bole na berangan se saat pon.. grr nt mesty ta paam.. miss terang kn sume saly b4 dy bg exercise.. yg aq paam 3 bnde tuh saleng brkait rapat.. sala siket je kt algorithm confirm sala flow chart yg kite wt tuhh.. nmpk mcm simple tp lecehhh ! dala marks dy siket jekkk.. grr saba jela nan subject niyy.. hmm Algorithm nan pseudocode uh actually lbey kurng je jwpn,, cume beze dy, jwpn utk Algorithm niy lg pjg dpd jwpn utk pseudocode.. so lg menyampah na wt Algorithm.. pleng best wt flow chart laa.. cume kne hfl dy punyer symbols.. Flow Chart niy ade 6 symbols (Start/End, Input/Output, Process, Decision, Arrows & Connector).. stakat niy yg aq paam is Start/End uh msty kne wt bile na wt Flow Chart.. Start ats saly, End bwh saly.. Input/Output plak kne wt b4 n after Process.. Input uh b4 wt Process, Output plak pas wt Process.. Process bese nye utk ltx formula yg da tsedie kt soklan.. Utk Decision, Arrows nan Connector uh aq kurng paam cz lom pna wt soklan yg kne gne kn symbol2 tuhhh.. nt lw da try wt, myb paam la kot.. insyallah (:
  • e.g for Input = read, get
  • e.g for Output = print, display
haaa.. ade lg yg penting dlm FOP niy.. utk sume formula, kite taley gune mathematical format.. tp kne gne programming format.. tp utk darab&bahagi jer, utk tambah&tolak still same mcm bese..
  • for multiply = * (e.g 100 * 2)
  • for divide = / (e.g 10 / 100)
e.g for flow chart symbols : http://www.breezetree.com/article-excel-flowchart-shapes.htm

e.g : Find Area Of Rectangle [formula : area=width*height]
       ALGORITHM
  • Get the width of rectangle
  • Get the height of rectangle
  • Calculate the area of rectangle by multiply width by height
  • Display the area of rectangle
       PSEUDOCODE
  • Read the width
  • Read the height
  • Set the area = width*height
  • Print output
       FLOW CHART :