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

4/05/2011

corrections for midterm examination ~

   S E C T I O N ( A )


   S E C T I O N ( B )
     1) Data Types

    2) If...else Statement


    3) Switch...case Statement

balek 10.00 p.m );

al- kesaaaah.. hmm last week nye class, dpt result mid term . terok gyler result ktorang . mis hangen, dala result mcm tuh, tmbh lg nan assignment ta waat . mis msok class, muke ta cerie mcm biase.. takooot jugaak.. dy ckp "saya tak suke macam niy !" ktorang dyam jela, da tw sala kaan . hm pastuh dy bg mase smpay kol 8 kne siap kn sume ass yg dy bg tuuh kt blog . then kol 8 tuh mis msok class na amek markah ass . pas settle sume tuh ktorang smbong wt correction . mis ckp ary niy balek kol 10 . wt correction, nt dy na suh student wt kt white board . spe yg sala jgk wt correction tuh, kne diri kt dpn smpay balek . haha nseb baek tade . adeeeh . abes wt discussion, mis ckp homework ktorang is kene wt correction kt blog . pastuuh, dy ckp next week nye class dy na sdie kn 5 soklan sal programming . so kene la study kat uma . tepat pukul 10 malam ktorang pon balek ke ruma mseng mseng ))=

3/27/2011

siap jugaak !! fuh lege

haa akhir nyeeer . ciap gak due due ass yg mis suh wt niy . aq ta la hebat mane bole wt bnde niy sume sndry . tp aq discuss n tgok cntoh dpd blog ita . tnx ita ! (: even da lmbat, tp atleast aq da wat . hmm sorry mis . sy lmbat buat, n pasal mid term tuhhhhh ): sorryyyy jugaak . hehe :D:D

ASSIGNMENT 2 !! :D

1) Write your program

2) Click save by enter your own file's name

3) Go to compile menu

4) Press any key for compiling the program

5) Go to run menu

6) Go to Window and click Output

7) Get the final output
  

ASSIGNMENT 1 !! :D

QUESTION :
Write a program :
* * * * * * * * * * * * * * * * *
M E S I N T I N M I N U M A N
- - - - - - - - - - - - - - - - -
Jenis                                   RM
- - - - - - - - - - - - - - - - -
1.Pepsi                               1.80
2.Coca Cola                       1.90
3.F&N Orange                  1.50
4.F&N Mirinda                 1.60
5.100 Plus                       2.00
* * * * * * * * * * * * * * * * *
your selection :
Insert your money :

*Your Balance are ________
* Please insert _________ . Your money is not enough !! : _________

Thank You !
Please Come Again

ANSWER :
Step 1 :
       

Step 2 :
       

Step 3 :
       

Step 4 :
       

Steap 5 :
       

Step 6 :
       

Step 7 :
            

Step 8 : ( bile masukkan duit lebih dpd harga asal )
       

Step 9 :
       

Step 10 :
       
      
Step 11 :
       

Step 12 :
       

Step 13 :
       

Step 14 : ( bile masukkan duit kurang dpd harga asal )
       

Step 15 :
       

Step 16 :
       

Step 17 :
       

Step 18 :
       

Step 19 :
       

3/26/2011

homework again ! :D

1) Complete the code that can calculate total marks for 3 students
for(int stud=1;____(a)____;stud++)
{
cout<<"Enter Student name:";
____(b)____name;
for(int mark=1;mark<=3;____(c)____)
{
cout<<"Enter assigment marks:";
cin>>marks;
total=____(d)____+marks;
}
}
cout<<"Total marks are"<<____(e)____;

(a) stud<=3
(b) cin>>
(c) mark++
(d) total
(e) total

2) Based on the short code below :
Change for loop statement below to while loop
for(x=1;x<=5;x++)
cout<<x<<"\t"<<x*2<<"In";

x=1;
while(x<=5)
cout<<x<<"\t"<<x*2<<"In";
x++

3) Write the code using while loop to get the output as below !
    20
    15
    10
    5
 
x=20
while(x<=5)
cout<<" "<<x;
x--;

yg niy aq tataw betol ke tak . sbb nyeer mis blom check . so klu aq ade sala, tlg sesaper tego aq k ? tnx :))

last exercise b4 our examination

1) Change the if...else statement below to switch...case statement
#include<iostream.h>
main()
{
int nomA,nomB,selection,value;
cout<<"Enter 2 number:";
cin>>nomA>>nomB;
cout<<"1.Addition";
cout<<"2.Substraction";
cout<<"3.Multiply";
cout<<"4.Division";
cout<<"Enter selection=";
cin>>selection;
if(selection==1)
{value=nomA+nomB;}
else if(selection==2)
{value=nomA-nomB;}
else if(selection==3)
{value=nomA*nomB;}
else if(selection==4)
{value=nomA/nomB;}
else
{cout<<"Invalid selection";}
cout<<"The value is:"<<value;
return 0;
}

#include<iostream.h>
main()
{
int nomA,nomB,selection,value;
cout<<"Enter 2 number:";
cin>>nomA>>nomB;
cout<<"1.Addition";
cout<<"2.Substraction";
cout<<"3.Multiply";
cout<<"4.Division";
cout<<"Enter selection=";
cin>>selection;
switch(selection)
{
case1:"value=nomA+nomB";break;
case2:"value=nomA-nomB";break;
case3:"value=nomA*nomB";break;
case4:"value=nomA/nomB";break;
default:cout<<"Invalid selection";
cout<<"The value is:"<<value;
}
return 0;
}

2) Change the for loop statement below to while loop
#include<iostream.h>
main()
{
int i,power2;
for(i=1;i<=9;i++)
{
power2=i*i;
cout<<" "<<i<<"power2"<<power2;
}
return 0;
}

#include<iostream.h>
main()
{
int i,power2;
//while
i=1;
while(i<=9)
{
power2=i*i;
cout<<" "<<i<<"power2"<<power2;
i++;
}
return 0;
}

3) Write a program that input 2 numbers. Compare the numbers & display only the biggest number. If the numbers are same, display the numbers are same.
#include<iostream.h>
main()
{
int nomA,nomB;
cout<<"Enter 2 numbers=";
cin>>nomA>>nomB;
if(nomA>nomB)
{cout<<"nom A is bigger than nom B";}
else if(nomA==nomB)
{cout<<"nom A is same as nom B";}
else
{cout<<"Invalid";}
return 0;
}

4) Write a program using for loop that receive prices of 3 products. Calculate the price that must be paid after 10% discount is given to every customer.
#include<iostream.h>
main()
{
int x,price,total,discount;
for(x=1;x<4;x++)
{
cout<<"price["<<x<<"]:";
cin>>price;
total=total+price;
}
cout<<"total="<<total;
discount=total*0.10;
cout<<"discount"<<discount;
return 0;
}

5) What is the output for the following program segmment
i) int x=20;
   for(int i=5;i<=x;i++)
  {
   cout<<i;
   i=i+4;
  }

  5
  10
  15
  20

ii) int mul=1;
   do
  {
   mul=mul*2;
   cout<<"The mul is:"<<mul;
   mul++;
  }
  while(mul<10)

  1
  3
  7

Exercise niy ktorang wt tyme mis wt extra class b4 exam . mis suh student wt kt white board . aq kne wt num 2 . pas uh aq sala sbb lupe na ltx semikolon . hmm cuai aq niy )= sume soalan niy mis da check n discuss nan ktorang . so jwpn dy insyallah betol (:

for loop & while loop pulaaak !

FOR LOOP
#include<iostream.h>
main()
{
//declare variable
int x,y;
cout<<"Enter an integer=";
cin>>x;
//loop for
for(y=1;y<x;y++)
{
cout<<" "<<x;
}
return 0;
}

WHILE LOOP
#include<iostream.h>
main()
{
//declare variable
int x,y;
cout<<"Enter an integer=";
cin>>x;
//while
y=x;
while(y<x)
{
cout<<" "<<x;
y++;
}
return 0;
}

iklan jap ..

weyhhhh ! sedey gyleerr . aq tye kak syaza td, mcm ner xm . ok ke ko . then dy suh aq tgok fb kak lia . dy ckp mis ade komen kt wall kak lia about our xm tuhhh . aq check, aq bace dan aq kecewe )): hmm ciap sebut name aq lagi . adeeh miss kecewa mesty aq wt terok . hmm susa nye na score subject niy T T hmm lg satuu pasal ass yg mis bg uhhh . knp susa sgt haa ? mcm mne la aq na ciap kn . adeeh

homework !!

QUESTION 1
a) Initializing variable Pi with the value 3.14
    const Pi=3.14;

b) Declare a variable named perimeter with double data type
    double perimeter;

c) Give instruction that allowed user to input data
    cout<<"Enter data=";
    cin>>data;

d) Input number of computer using variable
    cout<<"Enter number=";
    cin>>nimber;

QUESTION 2
Change the if...else statement below to switch...case statement
#include<iostream.h>
main()
{
int selection,quantity;
float price;
cout<<"1.pen=rm0.50";
cout<<"2.pencil=rm0.30;
cout<<"3.ruler=rm0.20";
cout<<"4.Erasor=rm0.10";
cin>>selection;
cin>>quantity;
if(selection==1)
{price=quantity*0.50;}
else if(selection==2)
{price=quantity*0.30;}
else if(selection==3)
{price=quantity*0.20;}
else if(selection==4)
{price=quantity*0.10;}
else
{cout<<"Invalid selection";}
cout<<"the price is :"<<price;
return 0;
}

#include<iostream.h>
main()
{
int selection,quantity;
float price;
cout<<"1.pen=rm0.50";
cout<<"2.pencil=rm0.30;
cout<<"3.ruler=rm0.20";
cout<<"4.Erasor=rm0.10";
cin>>selection;
cin>>quantity;
switch(quantity,selection)
{
case 1:"price=quantity*0.50";break;
case 2:"price=quantity*0.30";break;
case 3:"price=quantity*0.20";break;
case 4:"price=quantity*0.10";break;
default:cout<<"Invalid selection";
cout<<"The price is :"<<price;
return 0;
}

jom blaja pasal if...else statement & switch...case statement


ok bdasarkan table kt ats . kite bole wt program dlm 2 jenis bentuk . sama ade dlm bntuk if...else ataupon switch...case . ok now kite wt dlm bentuk if..else statement dlu k ..

IF...ELSE STATEMENT
#include<iostream.h>
main()
{
//declare variable
int age;
//input
cout<<"Enter your age=";
cin>>age;
//if...else statement
if(age>=1||age<=6)
{cout<<"you are kids !!";}
else if(age>=7||age<=12)
{cout<<"you are child !!";}
else if(age>=13||age<=21)
{cout<<"you are teenager !!";}
else if(age>=22||age<=30)
{cout<<"you are adult !!";}
else if(age>30)
{cout<<"you are old !!";}
else
{cout<<"Invalid selection";}
return 0;
}

SWITCH...CASE STATEMENT
#include<iostream.h>
main()
{
//declare variable
int age;
//input
cout<<"Enter your age=";
cin>>age;
//switch...case statement
switch(age)
{
case('age'>=1||'age'<=6):cout<<"you are kids !!";break;
case('age'>=7||'age'<=12):cout<<"you are kids !!";break;
case('age'>=13||'age'<=21):cout<<"you are kids !!";break;
case('age'>=22||'age'<=30):cout<<"you are kids !!";break;
case('age'>30):cout<<"you are kids !!";break;
default:cout<<"Invalid selection";
}
return 0;
}

hmm kadang soklan suh kite tuka if...else jd switch...case . kadang tuka switch...case g if...else . tp kadang soklan ta bg programming, tp kite kene develop sndry..




mid term da lepas .. alhamdulillah :D

hmm td tepat pkul 1p.m xm FOP . jantong aq mcm na gugo .tkot yg teramat sgt . sbb subject niy kan susa . tp alhamdulillah aq dpt jwb . cume yg variable name tuh aq btol btol lupe . terpakse tembak ;P hehe hm lw stakat na lulus bole la, tp lw na dpt highest mimpi jelaaa ): hmm btw, td mis ade tulis kt white board suh siap kn blog, sume ass n sume weekly reflection . tekejot aq bc . hmm due date ary niyy lak tuhh . adehh hope mis check blog aq nt tga tga mlm . lw skg, mmg ta lengkap ag la . jp g na wt k (:

3/02/2011

jawapan ! (:

msok cls, nmpk je kak lia n kak syezza, aq tros join dorang.. discuss cmne na wt jwpn utk questions yg mis bg last week.. actually num 1 nan 2 aq da wt da.. tp ade salah siket.. tQ kak syezza sbb da tego part mne yg sala.. ok jom bwat jwpn.. hee

1) a) 5 * 2 % 3 + 25 / 5
        = (5 * 2) % 3 + (25 / 5)  settle bhgi nan darab dlu
        = (10 % 3) + 5  settle modulus dlu
        = 1 + 5
        = 6

   b) a = 5 , b = 6
       !(( a < 3 ) & & ( a = = 3 ) | | ( b > 9 ))
       = !(( 5 < 3 ) & & ( 5 = = 3 ) | | ( 6 > 9 ))   msok kn nilai a nan b dlu
       = !((    0   ) & & (     0     ) | | (    0    ))   tntukan true / 1 or false / 0
       = !((    0   ) & & (     0     ) | | (    0    ))   settle kn & & dlu
       = !((    0    ) | | (    0    ))   br settle kn | |
       = !(0)   klu not / !, kne tebalek kn
       = 1 / True

2) Identify the syntex error in the following program
    include<iostream.h>  x letak simbol #
    mai()  ejaan sala, tetinggal hruf n
    {
     float allowance=300.00,salary;
    cout<<''Input Salary=";
    cin>salary;  sala simbol, ptot nye >>
    Tsalary=Sallary+Allowance;  formula sala, hruf T x perlu ade
    cout<<"salary is="<<salary;  lpas output, kne ltax return 0;
    } 

   JAWAPAN :
    #include<iostream.h>
    main() 
    {
     float allowance=300.00,salary;
    cout<<''Input Salary=";
    cin>>salary; 
    salary=Sallary+Allowance; 
    cout<<"salary is="<<salary;
    return 0;
    } 

3) FORMULA : working_days=day_of_month-non_working_days
                          monthly_salary=daily_salary*working_days
    #include<iostream.h>
    main()
    {
    //declare variable
    float day_of_month;
    float non_working_days;
    float daily_salary;
    float working_days;
    float monthly_salary;
    //input 1
    cout<<"total day of that month=";
    cin>>day_of_month;
    //input 2
    cout<<"non working days is about =";
    cin>>non_working_days;
    //input 3
    cout<<"daily salary is=";
    cin>>daily_salary;
    //formula 1
    working_days=day_of_month-non_working_days;
    //output 1
    cout<<"total working days is ="<<working_days;
    //formula 2
    monthly_salary=daily_salary*working_days;
    //output 2
    cout<<"the monthly salary is ="<<monthly_salary;
    return 0;
    }

4) FORMULA : total = num 1 + num 2 + num 3 + num 4 + num 5
                       average = total / 5
    #include<iostream.h>
    main()
    {
    //declare variable
    float num1;
    float num2;
    float num3;
    float num4;
    float num5;
    float total;
    float average;
    //input 1
    cout<<"enter num1";
    cin>>num1;
    //input 2
    cout<<"enter num2";
    cin>>num2;
    //input 3
    cout<<"enter num3";
    cin>>num3;
    //input 4
    cout<<"enter num4";
    cin>>num4;
    //input5
    cout<<"enter num5";
    cin>>num5;
    //formula 1
    total=num1+num2+num3+num4+num5;
    //output 1
    cout<<"total="<<total;
    //formula 2
    average=total/5;
    //output 2
    cout<<"average="<<average;
    return 0;
    }

5) FORMULA : area of rectangle = height * width
                        area of circle = 3.14 * radius * radius
                        area of triangle = 0.5 * height * base
    #include<iostream.h>
    main()
    {
    //declare variable
    float height;
    float width;
    float radius;
    float base;
    float area_of_rectangle;
    float area_of_circle;
    float area_of_triangle;
    //input 1
    cout<<"enter height";
    cin>>height;
    //input 2
    cout<<"enter width";
    cin>>width;
    //input 3
    cout<<"enter radius";
    cin>>radius;
    //input 4
    cout<<"enter base";
    cin>>base
    //formula 1
    area_of_rectangle=height*width;
    //output 1
    cout<<"the area of rectangle is="<<area_of_rectangle;
    //formula 2
    area_of_circle=3.14*radius*radius;
    //output 2
    cout<<"the area of circle is="<<area_of_circle;
    //formula 3
    area_of_triangle=0.5*height*base;
    //output 3
    cout<<"the area of triangle is="<<area_of_triangle;
    return 0;
    }

last week nye class..

hahahaha ! last week nye cls klaka gyle kot.. niy sume sbb CHINGAY laa.. ramay yg niat tanak dtg cls.. sbb sume jln tutop.. jammed gyle babay !! hahaha aq pon smpay cls kol 7p.m.. egt tanak dtg gak, tp tkot mis aja topic br.. tpakse la pegi jugaaak.. hmm da smpay cls tuh, ad jugak la yg dtg.. tp mcm ta smpay 10 org pn yg dtg.. mis ckp na aja new chapter, tp ktorng tanak.. sbb cian kt kwn yg len yg ta pat dtg.. t dorang ta paam, mis na kne aja balek.. cian kt mis jugak kn.. hmm so ktorng request bwat exercise lg bgos.. mis pon stujuuuuu ! (: mis tulis kt white board 5 questions.. pastuh mis tgl ktorg.. mis suh ciapkn.. ktorng pon salin laaa.. knon na wt.. tp mseng mseng wt muke comel sbb tataw na wt.. haha blur la korang kt cituhh..!

QUESTIONS :
1) Solve the question below
    Solve the working
    a) 5 * 2 % 3 + 25 / 5
    b) a = 5 , b = 6
        !(( a < 3 ) & & ( a = = 3 ) | | ( b > 9 ))

2) Identify the syntex error in the following program
    include<iostream.h>
    mai()
    {
     float allowance=300.00,salary;
    cout<<''Input Salary=";
    cin>salary;
    Tsalary=Sallary+Allowance;
    cout<<"salary is="<<salary;
    }

3) Write a program that will calculate the monthly salary for an employee that where
    Saturday and Sunday are considered as non-working days.

4) Write a program that calculates the average of 5 numbers that can be input by user.

5) Write a program that will calculate the area of rectangular, triangle and circle.

da abes salen, ktorng wt sme sme.. wt discussion nk crik jwpn.. soklan 1 nan 2 sng la jgk.. tp 3 4 5 tuh mcm pening siket sbb gune programming.. lme jgk ktorng dscuss tp ta dpt dpt gak.. smpay mis da msok cls.. mis tye knp ta ciap ag.. haha ktorng ckp susa.. ta paam.. mis trng kn cmne na wt.. pastuh mis tgl ktorng ag.. mis ckp kol 8.30p.m msty siap at least 3soklan.. tp malangnyeeeer b4 kol 8 ag ktorng da angkat kaki dr cls tuh.. sume tkot jln tutop, then taley balek.. sume pack brg, switch off lmpu, lock pintu, pegi blik lecturer.. wt muke ksian ckp kt mis "misssssss ktorang na balekkkk ! ): tkot jln sume tutop..takan na tydo cosmo" haha mis speechless then ckp ok la ok la.. "ok tq miss...BYE !" :D:D

2/21/2011

miss uji kitorang ..

haaa skg aq na smbong cite.. pas da ciap miss aja sume, n da aja mcm mne cre nak wat jwpn step by step.. miss bg 1 soklan.. then cm bese r, suh ktorng wt.. sj na test student paam ta.. maseng maseng smngat gyler na wat.. sbb tmbh tolak je kn.. cehhh ! pdahal susa jgk.. hahaha.. tp alhamdulillah aq pon dpt jwb ((: stakat niyy, chap 4 niy la plg sng bg aq.. bg aq laa.. tataw plak kwn kwn yg len.. hope dorang pon ok ! amiiin kt bwh niyy soklan yg miss suh ktorang wt..

SOALAN :
             

JAWAPAN :
              

just do it ! :D

EXAMPLE 1

EXAMPLE 2

EXAMPLE 3

chapter four ..

ok guys.. setelah sekian lame aq ta update ini blogggg, huhh ase cm malash la plaak na update.. haha.. tp na tanak kne update jgak!! (: mulekan nan bismillah cm bese.. hee hmm ok last week punyer class, miss bg notes utk chap 3 & 4.. tp knp ekk?? knp chap 3 kite ta blaja?? ntahh laa aq pon ta paam.. yg aq tw kite tros start nan chap 4.. express! :D miss trang kn byk bnde actually.. tp ad yg ta msok otak aq.. sbb kdng aq berangan.. tp lg byk yg msok dpd yg ta msok tuhh.. insyallah

Di sbbkn dlm bab niy kte blaja psl pngiraan, so tht byk simbol kte kne egt.. tw takkk?? meh sini bia aq aja ap je simbol yg aq ckp tuhh..

1) Arithmetic operators :
    + + (Unary Plus)
    - - (Unary minus)
    + (Addition)
    - (Substraction)
    * (multiplication)
    / (Floating-point division / Integer division)
    % (Modulus)
Dlm C++, ade increament nan decrement operator..
    + + (Pre-increment) e.g + +m
    + + (Post-increment) e.g m+ +
    - - (Pre-decrement) e.g - -n
    - - (Post-decrement) e.g n- -

Tips utk sng hfl : klw simbol dy tuh kt dpn variable (Pre-), kne tambah or tolak nan 1.. tp klw simbol kt blkng (Post-) xyah tmbah pape.. ekot jek mcm soklan dy.. aq bg cth k..
SOALAN :        a = 2 , b = 3
                      m = 2 , n = 3
                       p = 2 , q = 3
                       x = 2 , y = 3            

(+ + a) + (- - b) * 4 > (+ + m) * (- - n) + 4

JAWAPAN :
               

2) Relational operators :
    < (Less than)
    > (Greater than)
    = = (Equal to)
    < = (Less than or equal to)
    > = (Greater than or equal to)
    ! = (Not equal to)

3) Logical operators : (0/False , 1/True)
    & & (AND) ----> ade je 0 mesty 0/false
    | | (OR) ----> ade je 1 mesty 1/true
    ! (NOT) ----> tebalek kn jer.. klw 1, jwpn 0.. klw 0, jwpn 1
    !(& &) (NOT AND) ----> jwpn tbalek nan & &
    !(| |) (NOT OR) ----> jwpn tbalek nan | |
 e.g Question yg miss suh ktorang wt


2/11/2011

TARRAGON's group pon power ape ! :D

da abes wt 1st exercise, miss bg 2nd exercise plakk.. yg first td tuh tade markah ponn.. sj je na refresh otak kmi kmi niyy.. yg 2nd plak kne wt nan group mseng mseng..amek markah laktuhh.. tyme tuh cume ade 4group tmasok group aq saly.. so the best group akn dpt 4marks, 2nd dpt 3marks, 3rd dpt 2marks n the last group akn dpt 1marks.. mseng mseng kne bjuang na dpt kn 4marks tuhh.. hmm soklan yg miss bg 1 jer.. same jer utk sume group.. aq tunjuk soklan dy k..

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

Formula :
total=bm+bi+math+sains
average=total/4

kt ats niy soklan yg miss bg.. lw kw hebat, try la wt :P lw tataw na wt, tgok jwpn aq bg kt bwh niy k, pastuh try la paham kn (: ..eh lupe na ckp.. jwpn dy bukan hand writting tw.. tp typing kt Turbo c++ yg miss da install kt pc kt lab cosmo.. leceh tw taaaaak ! sala siket pon tiade maaf bg mu.. sbb nye komputer kn takder prasaan.. fuuhhh menyampah !

OK niy step na wt jawapan :
1) Go to my computer
     

2) Choose Local Disk (C:)

3) Click folder TC > folder BIN
    

4) Click TC application

5) If your windows can't support this system for full screen, just ignore MS-DOS Subsystem table
    (terime jela screen yg comel loteh kecik na mampos tuhh)

6) After open the Turbot C++ , click file > new > type your group coding

7) Answer for exercise 2

8) Don't forget to save the coding

9) To compile, go to compile menu and click compile

10) Press any key

11) If you make any mistake, syntax error will appear

12) To run, go to run menu and click run

haaa.. mcm tuh la cre na wt jwpn utk soklan kt ats td.. leceh kn?? hmm aq nye group dpt 3 marks je sbb ktorang byk sala.. asek asek syntax error.. pning pale na crik part mne yg ktorng wt sala.. tp end up dpt jgk.. even group laen da ade yg betol dr td.. so group aq yg mcm owg jakon, tjerit jerit jd 2nd group yg bjaye wt.. ok ape.. kire hebat jgk la kan?? hahaha tol tak geng?  yg kt ats uh jwpn lw typing dlm Turbo C++.. table tuh kcik sgt n ta bp na clear.. so aq bg jwpn lw hand writting k..

#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