#include <iostream.h>
#include<conio.h>
main()
{
clrscr();
int selection;
float price,money,addmoney,balance,result,total_mark;
cout<<"\*****HARGA PAKEJ*****";
cout<<"\n1.Pakej 1(kelas B2)";
cout<<"\nJumlah \t\tRm643.00";
cout<<"\nDeposit \t\tRm250.00";
cout<<"\n-*-*-*-*-*-*-*-*-*-*";
cout<<"\n2.Pakej 2(kelas B)";
cout<<"\nJumlah \t\tRm775.00";
cout<<"\nDeposit \t\tRm250.00";
cout<<"\n-*-*-*-*-*-*-*-*-*-*";
cout<<"\n3.Pakej 3(kelas D)";
cout<<"\nJumlah \t\tRm893.00";
cout<<"\nDeposit \t\tRm250.00";
cout<<"\n-*-*-*-*-*-*-*-*-*-*";
cout<<"\n4.Pakej 4(kelas B1)";
cout<<"\nJumlah \t\tRm773.00";
cout<<"\nDeposit \t\tRm250.00";
cout<<"\n-*-*-*-*-*-*-*-*-*-*";
cout<<"\n\nEnter your selection = ";
cin>>selection;
cout<<"please enter your money = ";
cin>>money;
cout<<"\nEnter your result = ";
cin>>result;
cout<<"PASS or FAILED ";
cin>>"\n pass or failed";
switch (selection)
{
case 1:price = 643.00;cout<<"\n\n kelas B2.";break;
case 2:price = 775.00;cout<<"\n\n kelas B.";break;
case 3:price = 893.00;cout<<"\n\n kelas D.";break;
case 4:price = 773.00;cout<<"\n\n kelas B1.";break;
case 5:result = 40;cout<<"\n\n result.";break;
default:cout<<"\n\nINVALID selection";
}
if(money < price)
{
balance = price - money;
cout<<"\nPlease insert more money (RM"<<balance<<")= ";
cin>>addmoney;
}else
{
balance = money - price;
cout<<"\nPlease take your balance (RM"<<balance<<")";
}
{
if(total_mark < result)
cout<<"\nPlease insert your result ("<<result<<")";
}
return 0;
}
Tuesday, May 3, 2011
@cosmo...
dgn ita dgn mia... nak wat fop kononnye... tetapi hmmm... hasilnye x siap2 gak... pening2... miss ayuni tolong la...
Wednesday, April 13, 2011
pening kepala...
duk umah ingatkan nak upgrade blog tp x reti gak nak wat... tulis kat kertas reti la tp bila pakai c++ terus blank situ... mcm mane nak wat ni...??? hmmm...
Wednesday, February 16, 2011
operators & expressions
- (++) pre-increment (++m) increment m by 1, then the new value of m in the expression in which m resides.
- (++) post-inctement (m++) use the current of m in the expression in which m resides, then increment m by 1.
- (--) pre-decrement (--n) decrement n by 1, then use the new value of n in the expression in which n resides.
- (--) post-decrement (--n) use the current value of n in the expression in which n resides, then decrement n by 1.
main( )
{
in + 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<<"inresult"<<result;
return0;
{
output result
=(1+6)+(7-1)*4<(1+8)*(9-1)+4 // 3+(2*4)>4*5+4
=7+24<72+4 // 3+8>20+4
=31<76 // 11>24
=true(1) true(1) false(0)
akhirnye setelah bnyk chapter yg kupelajari chapter ni yg paling ku fahami...
hehehe...
harap2 chapter seterusnye lebih senang la...
Monday, February 7, 2011
Subscribe to:
Posts (Atom)