Music ku

Tuesday, March 29, 2011

weekly reflection 8

mcm biasa class mule plul 10 pgi...
Pn. suruh siapkan semua Outcome
& sume latihan yg pnah dibuat dalam class
sblum ni... & msukkn dlm blog... & Pn.
suh submit sblum kul 1pm...
akhir nyer,.. smue nyer aq da bjya siapkan...

weekly reflection 7

no class...

Exercises no 1

Fill in the blank with appropriate data type for the 
following variables declaration syntax :-

a)  Numerik   (Integer) Number 1=1
b) Numerik   (Nombor Nyata) Number 3=3.0
c) Bukan Numerik (Rentetan)Text 1=”1 have a car”
d) Bukan Numerik (Aksara) Huruf = “B”
e) Bukan Numerik (Rentetan) AccountNo =”6666666443”

Exercises no 2








Answer:


#include <iostream.h>
main ()
{
float cgpa,diskaun,jumlah_pinjaman,bayaran_pinjaman;
cout<<"Jumlah pinjaman";
cin>>jumlah_pinjaman;
cout<<"CGPA yang diperolah:";
cin>>cgpa;

if ((cgpa>=3.99)&&(cgpa<=3.00));
diskaun=jumlah_pinjaman*80/100;
bayaran_pinjaman=jumlah_pinjaman-diskaun;
cout<<"\n Diskaun="<<diskaun<<endl;
cout<<"Jumlah pinjaman yang perlu dibayar 
selepas diskaun="<<bayaran_pinjaman<<endl;

if ((cgpa>2.99)&&(cgpa<=2.00));
diskaun=jumlah_pinjaman*40/100;
bayaran_pinjaman=jumlah_pinjaman-diskaun;
cout<<"\n Diskaun="<<diskaun<<endl;
cout<<"Jumlah pinjaman yang perlu dibayar
selepas diskaun="<<bayaran_pinjaman<<endl;

if (cgpa=4.00);
diskaun=jumlah_pinjaman*100/100;
bayaran_pinjaman=jumlah_pinjaman-diskaun;
cout<<"\n Diskaun="<<diskaun<<endl;
cout<<"Jumlah pinjaman yang perlu dibayar
selepas diskaun="<<bayaran_pinjaman<<endl;

}
return 0;
}

Exercises no 3

you are required to do program that will execute the multiply
or divided operation is based on the user's choice. You
must see Switch...Case statement Output:













Answer:

#include <iostream.h>
main ()
{
  //Declare variable
  int num1,num2,selection,total_multiply,total_divided;

  cout<<"masukkan nombor satu";
  cin>>num1;
  cout<<"masukkan nombor dua";
  cin>>num 2;
  cout<<"masukkan pilihan anda";
  cin>>selection;
  Switch(selection)
{
case 1:(selection=1)
  total_multiply=num1*num2;
  cout<<hasil darab"<<num1<<"dan<<num2<<"
  ialah"<<total_multiply endl;
  break;
case 2:(selection=2)
  total_divided=num1/num2;
  cout<<hasil_bahagi"<<num<<"dan<<num2<<"
  ialah"<<total_divide endl;
  break;
}
return 0;
}

Exercises no 4

Change the algebra expression to anthmetics expression












Answer:
a) y=(m-4ax)/79
b) y=6bc/(45s-2xy)
c) y=((2+AB+C)/3d)+5xyz
d) y=(2kb/2ki)-3jb
e) y=xy+x*x-2ab

Exercises no 5

Solve the statement below to find m value show the working:-
a) m=5
m*=m(3+4)*2
b) m=2
m*=((3*4)1/2)-9

Exercises no 6

Find the output for the following segment:-
a) float var 1=25.12, var 2=15.0;
if (var 1<=2)cout<<"var1 less or same as var2";
else cout<<"var1 bigger than var2";

b) in n=20; n/=5;

Exercises no 7

Convert the while statement below for statement
int j=10; while (j>0)
{
cout<<"   "<<j
J--J
}

Exercises no 8

Write of program that needs 4 prices using while loop
and calculate the sum of the thing a program must
use function while for calculate the average of the
prices.

#include <iostream.h>
main ()
{
int k;
float P,total,average;
K=1
while (k<=4)
{
cout<<"Enter price"<<K<<"=j;
cin>>P;
k++; total=total+P;
}
average=total/4;
cout<<"your total is"<<total<<"and average is"average;
return 0;
}

Saturday, March 26, 2011

Assignment 2

#include < iostream.h>
main ( ) {
int counter =1; //initialise a counter that will start at 1
int input;
// input
cout << "Enter an integer : ";
cin >> input;
// do this while your counter is less than 13 (stop at 12)

while (counter < 13) {
// display input, a string "x" , your counter, then multiply the amswer
cout ,< input << "x" ,< counter << "="<< input * counter << endl;
// increment your counter same as (counter=counter + 1) counter ++;
}
return O;
}

Tuesday, March 08, 2011

weekly reflection 6

aq msk clss dlm kul 9.25... um... n miss soh
rehat cmpay kul 10... kte owg wt pew yg ptt
sblm clss start... start clss Pn. soh wt lthan
on the whte board... um... Pn. bgi2 kn
nme by stiap lthn yg Pn. bgi...
n answer Pn. nk next week...
um... n last clss... Pn. dew bgi Ass...
gne pndraban n pmbhgian
menggunakn gglung / loop...
Pn. mnerangkn sdikt psl Loop
n bgi cth progamming ttg Loop..

Monday, March 07, 2011

Answer no2

#include<iostream.h>
main()
{
                float rectangular, circle, triangle, fahrenheit, celcius, radius,f,c;
                float width,height,base;
                char selection;

                cout<<"calculate:";
                cout<<"\n\n a-rectangular";
                cout<<" \nb-triangle";
                cout<<"\nc-circle";
                cout<<"\nd-fahrenheit";
                cout<<"\ne-celcius";


cout<<"\n\nenter selection";
cin>>selection;

if (selection=='a')
{
cout<<"\nYour Selection is a and you are calculate rectangular.";
               
                cout<<"\nenter width";
                cin>>width;
                                cout<<"\nenter height";
                                cin>>height;
                                rectangular=width*height;
cout<<"\nthe answer is"<<rectangular;
}

else if (selection=='b')
{

cout<<"\nYour Selection is b and you are calculate triangle.";
cout<<"\nenter base";
cin>>base;
cout<<"\nenter height";
cin>>height;

cout<<"\nthe answer is"<<triangle;
triangle=(1/2*base*height);
}

else if (selection=='c')
{
circle=3.142 * radius * radius;
cout<<"\nYour Selection is c and you are calculate circle.";
cout<<"\n enter radius";
cin>>radius;
cout<<"\nthe answer is"<<circle;
}

else if (selection=='d')
{
;
cout<<"\nYour Selection is d and you are calculate fahrenheit.";
fahrenheit=(celcius*1/8)+32;
cout<<"\nenter celcius";
cin>>c;
cout<<"\nthe answer is"<<fahrenheit;
}

else
{
cout<<"\nYour Selection is e and you are calculate celcius.";

cout<<"\nenter fahrenheit";
cin>>f;
cout<<"\nthe answer is"<<celcius;
celcius=(f-32)*(5/9);
}

return 0;
}

answer no.1

#include <iostream.h>
main()
{
                int drink;
                double price;
                double money;
                double balance;

                cout<<"**********";
                cout<<"\n Mesin tin minuman";
                cout<<"\n ------------------";
                cout<<"\n 1 - pepsi\t\t 2.00\n 2 - coca cola\t\t2.00\n 3 - F&N MIRINDA \t1.80\n 4 - F&N ORANGE\t\t1.80\n 5 - 100 plus\t\t2.50";
                cout<<"\n *********";

cout<<"\n\n enter your drink";
cin>>drink;
cout<<"\n enter your money";
cin>>money;

 if (drink==1)
{
balance=money-2.00;
cout<<"\n your drink is pepsi";
cout<<"\n Balance is"<<balance;
}

else
if(drink==2)
{
balance=money-2.00;   
cout<<"\n your drink is coca cola";
cout<<"\n Balance is"<<balance;
}

else
if(drink==3)
{balance= money-1.80;
cout<<"\n your drink is F$N MIRINDA";
cout<<"\n Balance is"<<balance;}

else
if(drink==4)
{
balance = money-1.80;
cout<<"\n your drink is f&n orange";
cout<<"\n Balance is"<<balance;
}

else
if(drink==5)
{
balance=money-2.50;
cout<<"\n your drink is 100 plus";
cout<<"\n Balance is"<<balance;
}

else
{
                cout<<" \n Invalid selection. Try again";
}

return 0;
}

Tuesday, March 01, 2011

Weekly Reflection 5 - 01/03/2011

klas awi nie xmcm biase,,, aq tkjt mlht Pn. Ayuni memakai tdung...
dan... Pn. sgt ssuai mmkai tdung... Sykur Alhamdulillah... 
dan Pn. tny kte owg da rht blom???... kte owg jwb mcm biase laa...
"Belom..."... um... Start jew kls... Pn. da bgi kami lthn... dan Pn. tglkn 
kami dlm kls n kmi sbok2 mnyiapkn tgsn dbri... dan Pn. nk lthn too siap sblm kls abis... 
tpi, group kte owg xdpt slsaikan lthn uw... smpai lh abis klas... dan Pn. ckp next week
bru bgi jwpn tok lthn too... um...
soaln tgk mcm sng dbuat... TETAPI.... 2jam pown xabs2 lgi wt lthn too..
isk2!!... sgt kcwa... huhuhuuu...  

***SELESAI SUDAH...***

Weekly Reflection 4 - 22/02/2011

aq msuk klas mcm biase... miss bgi rht cm biase... 
kami m'mlakn dgn chpter 4... Pn ckp hari ni kita akan
blja ttg math skit... Pn ajr kte owg psl;

Arithmetic Operators
+ -->> add
- -->> subtraction
* -->> multiply
/ -->> divide
% -->> modulus
^ -->> power

Relational Operators
> -->> more than/greater
< -->> less than
>= -->> greater/more than and equal
<= -->> less than and equal
= = -->> equal to

Logical Operators
&& -->> and
|| -->> or
! -->> not

macam biasa Pn. bgi lthn tok mguji kami sume... wt by group..
dan sungguh mlang group aq dpt 1 mark... um...
xpew... kami sume m'cbe dlu... 

Dan Pn. bgi kami homework dan hntar sblm kls mnggu dpn...
dan wt dlm blog msing2... 

***selesai sudah...***




Weekly Reflection 3 - 08/02/2011

aq xdtg klas... sbb xsht... so aq xtwu ppew dowg blja...
huhuhuhuhuuu... sgt rugi...


dowg gtwu 15/02... no clss... kn cuty...
smbt maulud Nabi... 

Weekly Reflection 2 - 01/02/2011

Aq msuk lmbt cket... ttpi masuk jew kls Pn. mnta kmi g rht dlu... so, sume g rht...
mcm biase lah Pn mlakn dgn chpter 2... dan kami d'perkenalkan dgn program C++...
fngsinyer, utk create n thu law dew errors pd coding yg kte create uw...
bnd2 basic dlm C++
*#include <iostream.h> --->>> HEADER
*main () --->> Start
*{ open curly bracket
*} close curly bracket
dan datatype;
*Int - Integar -->> real 0-9 only!
*float - float  -->> decimal
*double - double -->> decimal
*char - character -->> one alphabet only a-z, A-Z
*const - constant -->> formula
*string - string -->> one or more work

Weekly Reflection 1 - 25/01/2011

Permulaan kelas aku masuk awal n aq dah twu bhwe Pn Ayuni yg akn mengajar kte owg sume...
cz, FOP niwh sbject course IT.. huhuhuuu... kami dminta sign attendent n kami dminta
rehat dlm mse stgh jam... naik drpd rht kami dmnta m'perkenalkan dri msing2...
kami dbhgikn pd stiap kmpln da aq dlm kmpln WAKARIMA da kami ialah anne, daus, ieka, wany n aq nozey... slsai sudah... kami dbri ktrangn ttg Ass2 FOP... Tekun kmi m'dgr Pn Ayuni
bckp dhdpn klas... um... first day class pon da blja chptr 1... n Pn. de bgi lthn...
aku ttbe tprnjat cm nmpk hntu ngk soaln yg Pn. bgi...
sblm niwh aq xpna ngk soaln n xpna blja pown... aq tkg2... dan dlm fkrn aq tfkir,
adkh aq msuk clss arkitek???? kikikiii... ow!!! tdk sma skli... aq still lgi dlm kls FOP...
um... bwu aq twu yg FOP pon de blja math gak...

***selesai sudah kelas pada hari ini...***

Monday, February 28, 2011

Exercises No 1

a) const double Pi=3.14;

b) double Parameter;

c)cout<<"input data";
cin>>data;

d) int num_compt;
cout<<"input number of computer";
cin>>num_compt;