Daisypath Anniversary tickers

Daisypath Anniversary tickers

Monday, March 28, 2011

Alaaaaaaaaaaaaaaaaa................

ala.... Turbo C++ nih mane leh wat.. cemane nk wat ass yg gune C++....
HELP!!!! HELP!!!!! kalo x payah gune C++ bule ke???

Saturday, March 26, 2011

FOR LOOP & WHILE LOOP..... HULAHOOOOPPP.....

FOR LOOP...

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

WHILE LOOP...

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

new chapter

Soklan 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>>number;

Soklan 2

Change the if...else statement below to switch...case statement

#include
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 :"<return 0;
}

Jawapannye....

#include
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 :"<return 0;
}

IF.... ELSE.......SWITCH......CASE....STATEMENT.....XD

IF.....ELSE STATEMENT
#include
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
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;
}

EXERCISE

1) Solve the question below:

a) 5*2%3+25/5
=(5 * 2) % 3 + (25 / 5)
=(10 % 3) + 5
= 1 + 5
= 6

b) a=5, b=6
! ((a<3) && (a==3) || (b>9))
= ! ((5 < 3) && (5 = = 3) || (6 > 9))
= ! ((0) && (0) || (0))
= ! ((0) || (0))
= ! (0)
= 1 / True

2) Identify the syntax errors in the following program:

include
mai()
{
float allowance=300.00 salary;
//input
cout<<"input salary=";
cin>salary;
salary=salary+allowance;
//output
cout<<"salary is="<}

answer:

#include
main()
{
float allowance=300.00 salary;
//input
cout<<"input salary=";
cin>>salary;
salary=salary+allowance;
//output
cout<<"salary is="<return 0;
}

3) Write a program that calculate the monthly salary for an employes that where saturday & sunday are considered as non working days.

#include
main()
//declare variable
float no working days;
float salary per days;
float monthly salary;
//input 1
cout<<"no working days";
cin>>no working days;
//input 2
cout<<"salary per days";
cin>>salary per days;
//formula
monthly salary=working days*salary per days;
//output
cout<<"monthly salary="<return 0;
}

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

#include
main()
float num1;
float num2;
float num3;
float num4;
float num5;
float total;
float average;
//input 1
cout<<"num1";
cin>>num1;
//input 2
cout<<"num2";
cin>>num2;
//input 3
cout<<"num3";
cin>>num3;
//input 4
cout>>"num4";
cin>>num4;
//input 5
cout<<"num5";
cin>>num5;
//formula 1
total=num1+num2+num3+num4+num5;
//output 1
cout<<"total="<//output 2
cout<<"average="<return 0;
}

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

#include
main()
{
//declare variable
float height;
float width;
float area of rectangle;
float radius;
float area of circle;
float height;
float area of triangle;
//input 1
cout<<"height";
cin>>height;
//input 2
cout<<"width";
cin>>width;
//input 3
cout<<"radius";
cin>>radius;
//input 4
cout<<"height";
cin>>height;
//formula 1
area of rectangle=height*width;
//output 1
cout<<"area of rectangle="<//formula 2
area of circle=3.14*radius*radius;
//output 2
cout<<"area of circle="<//formula 3
area of triangle=0.5*height*height;
//output 3
cout<<"area of triangle="<return 0;
}

latihan

wat latihan lagik....

soklan...

















jawapan...







erm.. x clear sangat le... huhu.. tp still leh bacekan.. hehe..

aa.. peberet chapter.....

Aaaaa... yang nih chap yg paling aku suke... kire chap peberet le.. best sebab senang nk paham.. gagaggaa.. huhu... maklom la.. chap len mcm nk pecah pale.. chap nih sronok sket.. men kire2.. cam math...

Arithmetic operators :
+ + (Unary Plus)
- - (Unary minus)
+ (Addition)
- (Substraction)
* (multiplication)
/ (Floating-point division / Integer division)
% (Modulus)

increament & decrement operator..
+ + (Pre-increment) e.g + +m
+ + (Post-increment) e.g m+ +
- - (Pre-decrement) e.g - -n
- - (Post-decrement) e.g n- -

soklannye...

a = 2 , b = 3
m = 2 , n = 3
p = 2 , q = 3
x = 2 , y = 3


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

jawapannye pulak...

(+ + a) + (- - b) * 4 > (+ + m) * (- - n) + 4
(2 + 1) + (3 - 1) * 4 > (2) * (3) + 4
(3) + (2) * 4 > 2 * 3 + 4
3 + 8 > 6 + 4
11 > 10
1 / TRUE


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


Logical operators :

& & (and)








l l (or)







! (not)






! (& &) (not and)
! (l l ) ( not or)


Soklan for group...

Soklan nih miss bagi tp kene wat ikot group.. soklan nih da upload kt forum.. tp lupe lak nk upload kt blog... huhu.... err... mase nih group kitorg dpt second last.. okeh le tuh...


Bahasa melayu=
Bahasa inggeris=
Matematik=
Sains=
Total=
Average=


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

jawapan seperti berikot...


#include//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="<//formula
average=total/4;
//output
cout<<"average="<return 0;
}//close curly bracket
//end body


miss soh wat dlm C++.. oleh kerane akunye comp nih bengap sangat.. aku x leh nk wat C++.. so aku just typing je la... da pening sangat da nk wat C++ nih camne.. kalo nk tunggu alamat x siap la keje aku.. hukhukhuk...

SOKLAN MENGUJI

Mase soklan nih.. ehem.. aku mcm bese la... lambat masok class.. tp still ramai yg lom masok class.. bebudak len da stat wat soklan.. then aku pon menyelit le kt sbelah yani.. hukhukhuk.... err.. ni jawapan tok soklan uh....

Soklannye...

Multiply and divide two FLOAT numbers with using the formula below:
multiply=num1*num2
divide=num2/num1

jawapannye pulak...

Flow chat





















#include
main()// start body
{// open curly bracket
//declare variable
float num1;
float num2;
float multiply;
float divide;
//input 1
cout<<"enter num 1"; cin>>num1;
//input 2
cout<<"enter num 2"; cin>>num2;
//formula
multiply=num1*num2;
//output
cout<<"multiply="<//formula
divide=num2/num1;
//output
cout<<"divide="<return 0;
}//close curly bracket
//end body

FINDING

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




















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




















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

Thursday, March 10, 2011

APE PASAL HA?!!!!!

Ape pasal ek? Pelik...
apsal nk install turbo C++ nih x bley...
saket ati tol... kt laptop x bley, kt PC x bley... abeh tu camne nk wat..
aku nih banyak sangat kot dosenye......... dari ari tu ade je masalah kalo nk wat keje..
Huuu... kene muhasabah diri nih...
Tiap kali nk wat keje je tenet x leh gune la.. xde karen la.. x masok lagik masalah2 yg len2...
Dulu sebok keje.. ni da brenti keje pon still x bley wat jugak.. Nk masak la.. Basoh baju la.. Husband balik uma tau da siap masak.. uma da bersih... hmm... bukan merungut.. tp rasenye aku pon still x pandai nk susun timing kot.. tu la antare sebab musababnye aku rase la...
Kadang2 tension.. tp still ingat tuhan... hehe...
Dulu nk g class problem keje... x sempat.. x de bas.. jalan jem.. skang da x keje.. ujan pulak tiap2 petang.. huh.. petang nih aku ade class nih.. tp xtau dpt g ke x.. sbb ujan nih.. siap ade petir dan guruh... kesiankan aku..
Pade kawan2 yg bace post nih... atau pade sesape yang berkenaan la.. kalau aku ade wat salah kt korang.. ade wat dose yg aku prasan atau x prasan.. (kadang2 gurau2 terkasar then x prasan korg touching....) aku mintak maaf la ye.. mungkin sbb banyak dose kt korang, aku nih slalu dilande masalah... aku berdoa semoga segala urusan aku berjalan dengan lancar... amin........

Monday, March 7, 2011

Lagik.. Chapter Two pulak...... (*_*)

Kat Chap 2 nih kitorg blajo pasal C++.. Erm amendealah uh.. Progamming language ke? uuuu... tu la.. mase class asik nk skip je.. padahnye sape nk nangung.. naseb ade membe yg prihatin kasik notes... Luv U gurlz.. Cayang korang.. hehe.. kat bawah nih contoh C++ yg mis aja... kalo nk wat mendealah nih mestilah berdasarkan flowchart yg kite wat uh..

#include //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="< return 0;
}//close curly bracket
//end body

Nk wat coding nih kene ikot rules macam kt bawah nih:
1) Mule2 kene ikot formula macam yg die bagi, area utk circle area= 3.14*radius*radius
2) Carik brape variable name yg ade pastu declarekan
3) Pastu wat flowchart ikot soklan
cth:start>read radius>area=3.14*radius*radius>print output >end
4) Pastu wat la coding macam kt atas uh..



START..............( Tu We Ige..) GO!!!!

Firstly kite start nan Chapter One la ek... Hmm..
Kat Chap 1 nih kitorg blajo tang Algorithm, Pseudocode, nan Flowchart...

Algorithm = sequence of instructions to solve a problem.

Pseudocode= outline of a program, written in a form that can easily bo converted into programming statement.

Flowchart = graphic representation of the logic or steps in a program.

e.g: Find Area Of Rectangle

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


Flowchart




















FUHHHH!!!!!!!!!!

Gile macam tuuutttt...... Gatal sangat tangan g tuko2 layout blog nih.. da sudah abes ilang sume tulisan.. uuu... padahnye sume keje tergendale.. satu keje x jadik. frust gile.. geram gak rasenye.. tp sala sendrikkan.. tp ari ni berjaye di selamatkan jugak setelah berusehe mengodeh- godeh sume2 yg ade.. hoho.. poyo sungguh.. tu la. bute IT kan.. KESIAN......

ehem......

testing testing....