Wednesday, February 23, 2011

Nie excercise yg miss bgi...huhuhhu....EXERCISE 2

Exercise 2 : QUESTION
Bahasa melayu=
Bahasa inggeris=
Matematik=
Sains=
Total=
Average=

Formula :
total=bm+bi+math+sains
average=total/4
ANSWER
#include<iostream.h>//header
main()//start body
{//open curly bracket
float bm;
float bi;
float math;
float sains;
float total;
float average;
//input 1
cout<<"bahasa melayu=";
cin>>bm;
//input 2
cout<<"bahasa inggeris=";
cin>>bi;
//input 3
cout<<"matematik=";
cin>>math;
//input 4
cout<<"sains=";
cin>>sains;
//formula
total=bm+bi+math+sains;
//output
cout<<"total="<<total;
//formula
average=total/4;
//output
cout<<"average="<<average;
return 0;
}//close curly bracket
//end body

Monday, February 21, 2011

register forummmmm.....2/2/11

alamak ade keje lgi...
kitorg kne wat step2 tok register forum....
gne print screen lgi.....
huhuhu.....bnyk keje seh....

STEP 1 go to all program >> internet explore



STEP 3 Register by click JOIN


STEP 4 click agree


 STEP 5 complete register information and save
 
STEP 6  Confirm your password and save
 
 
STEP 7 Check your yahoo ID and password
 
STEP 8 Click the link given
 
STEP 9 try login your forum to check
 
STEP 10
 
 
*huhuhu settle pun..tpi serabot gak auw nk wat...bab kene wat bnyk keje tau...smpai teslah2 aq wat tau...dh nk kne wat blek...tu yg wat kn serabot tu....
 


Wednesday, February 16, 2011

all example question yg miss bagi

2/07/2011

example 1 

       Find Area Of Circle [formula : area=3.14*radius*radius]  
       ALGORITHM
*Get the radius of circle
*Calculate the area of circle with 3.14 multiply by radius by radius
*Display the area of circle

       PSEUDOCODE
*Read the radius
*Set the area = 3.14*radius*radius
*Print output

       FLOW CHART :

example 2
 
      Find Celcius [formula : celcius = (5/9)*(fahrenheit-32)]
        ALGORITHM
*Get the fahrenheit of celcius
*Calculate celcius equal to five divided by nine multiply by fahrenheit minus 32
*Display the celcius of fahrenheit

       PSEUDOCODE
*Read the fahrenheit
*Set the celcius = (5/9)*(fahrenheit-32)
*Print output

       FLOW CHART :
 
examlpe 3
      Find Fahrenheit [formula : fahrenheit = (9/5)*(celcius+32)]
        ALGORITHM
*Get the celcius of fahrenheit
*Calculate fahrenheit equal to nine divided by five multiply by celcius plus 32
*Display the fahrenheit of celcius

       PSEUDOCODE
*Read the celcius
*Set the fahrenheit = (9/5)*(celcius+32)
*Print output

       FLOW CHART :

Chapter Two

 #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
step2 nak wat nye :
1) firstly ngok formula yg tlah dibagi ;
*example area utk circle is area=3.14*radius*radius

2) second,cari bpe banyak variable name yg ade dlm cnth yg diberi.

3) then, declare variable

4) after that, wt flow chart bdasarkan soklan yg dy bg
*cth : start > read radius > area=3.14*radius*radius > print output > end

5) haa dh settle semua tdi,bru leh start wt coding.. ade beberape pkare yg sgt penting dlm coding niy.. antarenye :
*in the 1st line mest msukkn #include<iostream.h>
*in the 2nd line maskkn main()
*3rd line jgn lupe wt { tok strating & pntup wat body
*all in flow chart kne tulis dlm body
*huruf depands pade soalan sama ade huruf kecik smua @ besar
*xbole ade space except 4 the certain part mcm comment, declare variable and input&output yg ade dlm ("") & return 0
*dlm coding,jgn lupe letak simbol semi colun;
Comment
  • //*utk 1 baris coding
  • /* , */ = utk ksuluruhan coding / >1 baris coding
  • depands pde u all nk jarak2 @ rapat2

Declare variable ( Start )
*wjib hafal & kne tau k..
    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 ;

WAJIB TAU :
  • jgn salah ejaan,huruf besa @ kecik 
  • key in ikot soklan, jgn short form2
  • bahasa melayu= jgn wat bm plak. xbly suke2 wat short form k 
  • dlm ( " " ) tplang pde u all nk space @ x 
Output
         cout<<"______"<<variable_name_that_had_declared ;