Ahad, 10 April 2011
class tambahan......../////////// 20/3/2011
arini class tambahan blaja tentang chapter baru tentang if...else ngan swicth......case..........sshlah juga....mula2 agak xfaham sgt tp 2,3 kali miss terangkan baru faham....tp cara nak buat mmg ssh....ishh lemau tul bab program ni...rasa cam nak tercabut kepala aku ni....
exam...exam...exammm......!!!!!! 26/3/2011
aduhai....tension nye soklan ssh betul....aku just buat yang mana aku tau jek...yang lain aku hentam jek...xtau ape nak buat...ntah betul ntah x aku buat....aku pun xtau.....xpelah janji paper dah habis kene bersiap sedia dengan final exam jek....usaha sudah jawab sudah pasni apepun markah redha je lah...salah ke betul ke...terima saja yang penting jawab...masa nie Tuhan saja yang tau betapa ssh nye soklan yang miss buat...perghhh...nak pecah kepala juga fikirkan jawapannya....apepun alhamdulillah dpt jawab juga walaupun ada dua tiga soklan aku kosongkan tp xpelah janji aku mencuba...
Rabu, 6 April 2011
hari ini dalam sejarahku....... 2/3/2011
ari ni aku mc kj sbb kelmarin aku excident walaupun kaki aku sakit lagi aku ttp gagahkn diri utk dtg juga sbb xnak tinggal pelajaran...chewahh...hehhehe....hmmm....ari nie bermula cari jawapan....jawapan dr soklan yang miss bagi...soklan yang 1st tu agak senanglah juga....blh skor full mark..hehhehehehe...tp kalau dlm exam xtau blh full mark ke x...hehhehehehe...xpe aku cuba....jawapannya cam kat bawah ni...
jawapan:
1) a) 5 * 2 % 3 + 25 / 5
jawapan:
1) a) 5 * 2 % 3 + 25 / 5
= (5 * 2) % 3 + (25 / 5) settle bhgi n 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 )) settle nilai a n b dlu
= !(( 0 ) & & ( 0 ) | | ( 0 )) tntukan samada 1/true or 0/false
= !(( 0 ) & & ( 0 ) | | ( 0 )) settle kn & & dlu
= !(( 0 ) | | ( 0 )) br settle kn | |
= !(0) klu !/not , jwpn mesti terbalik
= 1 / True
2) include<iostream.h> xde simbol #
mai() tetinggal hruf n
{
float allowance=300.00,salary;
cout<<''Input Salary=";
cin>salary; simbol salah >>
Tsalary=Sallary+Allowance; xyah letak T kat formula
cout<<"salary is="<<salary; pas output, mesti return 0;
}
JAWAPAN :
#include<iostream.h>
#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;
}
JAWAPAN :
#include<iostream.h>
main()
{
float allowance=300.00,salary;
cout<<''Input Salary=";
cin>>salary;
salary=Sallary+Allowance;
cout<<"salary is="<<salary;
return 0;
return 0;
}
3) FORMULA : workingdays=day_of_month-non_working_days
monthlysalary=daily_salary*working_days
#include<iostream.h>
main()
{
//declare variable
float day_of_month;
float non_working_days;
float daily_salary;
float workingdays;
float monthlysalary;
//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
workingdays=day_of_month-non_working_days;
//output 1
cout<<"total working days is ="<<working_days;
//formula 2
monthlysalary=daily_salary*working_days;
//output 2
cout<<"the monthly salary is ="<<monthly_salary;
return 0;
}
4) FORMULA : total = num1 + num2 + num3 + num4 + num5
average = total/5
monthlysalary=daily_salary*working_days
#include<iostream.h>
main()
{
//declare variable
float day_of_month;
float non_working_days;
float daily_salary;
float workingdays;
float monthlysalary;
//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
workingdays=day_of_month-non_working_days;
//output 1
cout<<"total working days is ="<<working_days;
//formula 2
monthlysalary=daily_salary*working_days;
//output 2
cout<<"the monthly salary is ="<<monthly_salary;
return 0;
}
4) FORMULA : total = num1 + num2 + num3 + num4 + num5
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;
}
ni lah jawapan kitorang...sbb jawapan ni bincang dlm group...hehhehehehe....so far lah semua sama jek...cume bile create program tu ada jarak ada xjarak jek....xpe jnji faham ape yang kite buat....pas dah jawap kene buat sorang2 kat depan n then update kat blog masing2....huhuhuhuhu...siap sudah....
Rabu, 30 Mac 2011
lu punye pasal....CHINGAY.... 23/2/2011
minggu ni miss bagi soklan plak nak uji kefahaman kitorg....miss hentam bagi 5 soklan.....kitorang bukan xtau nak buat tp cepat lupe apa yang dah blaja....ape xnye class seminggu sekali....kalau cam sekolah menengah dulu lainlah...ikut jadual ni ikut hari...fuhh...nak ingat balik...punyelah lemau nauzubillah...apapun congrat kat miss sbb bagi soklan yang mencabar pd kitorg....kat bawah ni soklan2 miss bagi....
soklan miss:
1) Solve the question below:
Solve the working
a) 5 * 2 % 3 + 25 / 5
b) a = 5, b = 6
! (( a < 3) && (a = 23) // ( b > 9))
2) Identify the syntac error in the following program:
include<iostream.h>
mai()
{
float allowance=300.00 salary;
cout <<"Input Salary=";
cin>salary;
Tsalary=salary + 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 reactangular, triangle and circle.
pas miss bg soklan ni...miss nak jawapan..tp kitorang xsiapkan sbb risau pasal ari ni ada CHINGAY ngan student ramai yang xdpt dtg sbb perayaan ni lah.....nyibuk jek......time tulah diorang nak buat jammed jalan....kitorg xsenang duduk sampai xfikir nak jawap soklan miss ni..hahhahaha....semua angkat kaki nak balik takut kenderaan xleh kuar....hahhahaha...miss jadi kalut...tp miss bg balik gak sbb miss pun risau juga takut die pun xbalik..hhehehehehehe...apapun homework is homework....kene lah siapkan....hmmm....
Selasa, 8 Februari 2011
pppppeeeeeennnnniiiiiingggggg!!!!! 16/2/2011
kali ni blaja chapter lain plak....bab yang ni agak pening jugak...tapi...redahh jek....bile tengok notes yang miss bagi agak fening tapi bile miss terangkan memang faham sesangat....cume kene faham simbol dah tau step nye camner.....ok kite cubeee try test....
Chapter 4: operators and expressions
dalam chapter ni kite akan blaja pasal 4perkara:-
1) arithmetic operators
2) relational operators
3) logical operators
4) assignment operators
so kite blaja yang 1st dululah....miss terangkan simbol2 yang kite akan gunakan bg menjawab soklan dalam exam....ni cam nak blaja matematik plak....
1) arithmetic operator:-
2) relational operators:
3) logical operators:
example yang miss nak uji minda kitorang:
sekarang ni miss terangkan bagaimana nak selesaikan masalah matematik dalam sistem coding....miss bagi contoh soklan n miss tunjukkan macam mana nak jawab.....agak ssh tp kene cuba ni....masuk exam tu....huhuhuhuhu
soklannye...
a=2 b=3
m=2 n=3
p=2 q=3
x=2 y=3
result: ni jawapan dalam pre-increment.
miss bagi lagi soklan untuk uji minda lagi....kali nie lebih rumit lagi sbb kene buat jawapan panjang lebar....pergh...fening lagi nak jawab....xpelah apepun kene fokus sbb nti xingat plak cara2nye...yang kene ingat apapun yang kite nak jawab 1st think kene settle operasi darab (*) dahulu....
result: ++a + --b * 4 > ++m * --n + 4
&& p++ + q-- * 4 < x++ * y-- + 4;
ni cara menjawab dalam pre-increment dan post-increment.
Chapter 4: operators and expressions
dalam chapter ni kite akan blaja pasal 4perkara:-
1) arithmetic operators
2) relational operators
3) logical operators
4) assignment operators
so kite blaja yang 1st dululah....miss terangkan simbol2 yang kite akan gunakan bg menjawab soklan dalam exam....ni cam nak blaja matematik plak....
1) arithmetic operator:-
2) relational operators:
3) logical operators:
example yang miss nak uji minda kitorang:
sekarang ni miss terangkan bagaimana nak selesaikan masalah matematik dalam sistem coding....miss bagi contoh soklan n miss tunjukkan macam mana nak jawab.....agak ssh tp kene cuba ni....masuk exam tu....huhuhuhuhu
soklannye...
a=2 b=3
m=2 n=3
p=2 q=3
x=2 y=3
result: ni jawapan dalam pre-increment.
miss bagi lagi soklan untuk uji minda lagi....kali nie lebih rumit lagi sbb kene buat jawapan panjang lebar....pergh...fening lagi nak jawab....xpelah apepun kene fokus sbb nti xingat plak cara2nye...yang kene ingat apapun yang kite nak jawab 1st think kene settle operasi darab (*) dahulu....
result: ++a + --b * 4 > ++m * --n + 4
&& p++ + q-- * 4 < x++ * y-- + 4;
ni cara menjawab dalam pre-increment dan post-increment.
kite ke soklan seterusnye.....soklan ni haruslah menjawab dalam bentuk coding...soklannye....
aekarang nie aku dah faham camner nak jawab so semuanye bergantung pada soklan yang diberi....blaja fop ni seronok tp nak kene fokus baru leh faham......jika....
#include<iostream.h>
main()
{
int n;
n=5; ---> nilai input
//pre increment
cout<<n; 5
cout<<++n; 6
cout<<n; 6
//post increment
cout<<n; 5
cout<<n++; 5
cout<<n; 6
return 0;
}
contoh jawapan yang lain pula....miss terus tunjuk dalam bentuk coding lagi...
#include<iostream.h>
main()
{
int m;
m=7; --->nilai input
//pre increment
cout<<m; 7 @ leh buat...cout<<" "<<m;
cout<<--m; 6
cout<<m; 6
//post increment
cout<<m; 7
cout<<m--; 7
cout<<m; 6
return 0;
}
soklan yang seterusnye...dari bentuk coding dan jawapan die cume nak tau result yang ada dlm coding....so caranye nak cari jawapan....
#include<iostream.h>
main()
{
int result, a,b,m,n,p,q,x,y;
result=0;
a=6;
b=7;
m=8;
n=9;
p=3;
q=2;
x=4;
y=5;
result=++a + b-- * 4< ++m * --n + 4
&& p++ + q-- * 4 > x++ * y-- + 4;
cout<<"\n result="<<result;
return 0;
}
what is the output of result?
jawapan: result = 1/true
camner dapat kite tengok ye cecaranye......
hmmmmm......finish dah aku update....next week update lagi....so class its finish today....see u miss next week......alhamdulillah...
thanks 4 all everythings.....
hoooorrrrraaaayyyyyyyy
akhirnya blog aku berjaya disiapkan walaupun blog aku lagi satu xleh nak buka...dengan mencipta blog yg baru akhirnye selesai tugasku.....ntah macam mana aku blh lupe email blog aku pun xtau.....tp xpe kekalahan bukan bererti gagal selamanye.....hooooorrrrreeeeyyyyyyyyyyyyyyyy....apepun thanks to miss ayuni coz beri aku peluang buat blog...selama ni aku ingat buat blog ssh tp senang rupenyeee.....thanks 4 kak syaza bg tunjuk ajar...u r best girl....becoz of u lah aku mencapai kejayaan buat blog...hehehehehehehhee....seronok rasa hati....uuuulalalallaallalalalalla...pas ni leh tidor ngan lena sampai pagi....
akhirnya blog aku berjaya disiapkan walaupun blog aku lagi satu xleh nak buka...dengan mencipta blog yg baru akhirnye selesai tugasku.....ntah macam mana aku blh lupe email blog aku pun xtau.....tp xpe kekalahan bukan bererti gagal selamanye.....hooooorrrrreeeeyyyyyyyyyyyyyyyy....apepun thanks to miss ayuni coz beri aku peluang buat blog...selama ni aku ingat buat blog ssh tp senang rupenyeee.....thanks 4 kak syaza bg tunjuk ajar...u r best girl....becoz of u lah aku mencapai kejayaan buat blog...hehehehehehehhee....seronok rasa hati....uuuulalalallaallalalalalla...pas ni leh tidor ngan lena sampai pagi....
ape plak ari ni????....9/2/2011
hari nie aku masuk lambat...ape xnye perut ku lapar sangat.....g makan dulu sebelum masuk class....fuhhh kenyang giler xterkira....masuk je class ada soklan...fuhh...soalan mencabar minda....hehhehehee...so aku, ain, chacha n ayu group terakhir dan kami semua dapat soklan terakhir...
Exercise 3:
Modulus two float members, num1 & num2 with using the formula below:-
formula: modulus=num1%num2
#include<iostream.h>//header
main( )//start body
{//open curly bracket
//declare variable
float num1;
float num2;
//input1
cout<<num1=";
cin>>num1;
//input2
cout<<num2=";
cin>>num2;
//formula
modulus=num1%num2;
//output
cout<<"modulus="<<modulus;
return 0;
}//close curly bracket
//end body
next step miss suruh duk dalam kumpulan untuk buat dlm sistem plak....kite tengok group sapa yang menang...hehehehehe...sshlah juga nak buat dlm sistem tp xpe blaja dr ssh...bru dpt senangnye...huhuhuhuhu...kitorang dah buat tp ada yang salah...walauapapun kitorang dapatlah 3markah....alorr sikitnye....hehhehehe...xpe kalah dulu....janji faham apa yg kite buat...
soalan miss bg berbunyi begini....ewahhh...:-
exercise in group...
bahasa melayu=
bahasa inggeris=
matematik=
sains=
total=
average=
formula: total=bm+bi+math+sains
average=total/4
pas ue miss bagilah cecara nak buat dlm sistem.....ni dia latih tubi....huhuhuhu...ssh mmg ssh tp enjoy buat ni....rasa cam nak tukar cite-citeku nak jadi programming....hahahhahahahaha...lawak..lawak..lawak....apapun mencabar juga mindaku yg cukup kerdil ini....namun harusku tempuhi jua...hehehehe....walaupun ada salah sikit2 tu biaselah adat manusiakan....tp belajar dr kesilapan.....yok nengok camner aku buat...get ready....1..2..3...gooo!!!!!!!
step-stepnye....
1) open your computer-go start button-choose and click COMPUTER:
2) double-click LOCAL DISK (c:):
3) choose and double click folder TC:
4) choose and double-click folder BIN:
5) choose and double-click folder TC again:
6) click IGNORE to open the TURBO C++:
7) after turbo c++ open, click FILE and choose NEW:
8) after this, enter your group coding:
9) to look the result, click COMPILE MENU and choose COMPILE:
10) COMPILING box appear the error coding and press any key to show:
11) the error coding was display, double-click the error:
12) the TOTAL and AVERAGE is error because is not input:
13) it is the true answer, no input TOTAL and AVERAGE in the coding:
14) click COMPILE again in compile menu:
15) press any key in COMPILING box:
16) double-click the error #2 :
18) COMPILE again until the coding no more error:
19) after compiling box appear, in the total error have 0:
20) press any key for appears the result and in box message no error:
21) save as the coding, click FILE and choose save as:
22) enter your group name and click OK button:
23) the file change name to TERRAGON file:
24) click RUN menu and choose RUN:
25) the turbo c++ box appear:
26) enter the number in the box n press ENTER button:
27) press ENTER button again for show the total and average:
Langgan:
Catatan (Atom)