tag:blogger.com,1999:blog-31473602774865378712024-03-05T13:47:37.660-08:00zhoel blogsam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-3147360277486537871.post-27919830419796690962011-04-15T06:21:00.000-07:002011-06-13T21:12:02.779-07:00Program kalkulator sederhana C++#include <iostream><br />
#include <cstdlib><br />
#include <iomanip><br />
#include <string><br />
#include <math.h><br />
using namespace std;<br />
class KALKULATOR{<br />
friend ostream & operator << ( ostream &, const KALKULATOR & );<br />
friend istream & operator >> ( istream &, KALKULATOR & );<br />
<br />
public:<br />
void MENU();<br />
void ulang();<br />
void tambah();<br />
void kurang();<br />
void kali();<br />
void bagi();<br />
void INPUT1();<br />
void INPUT2();<br />
void pilihan1();<br />
void pilihan2();<br />
void pilihan3();<br />
void sines();<br />
void cosines();<br />
void tangen();<br />
void logku();<br />
void log10ku();<br />
void sqrtku();<br />
void expku();<br />
<br />
private:<br />
char opt; <br />
int pilih;<br />
float hasil0;<br />
float hasil1;<br />
float a;<br />
float b;<br />
float c;<br />
<br />
};<br />
<br />
void KALKULATOR::MENU(){<br />
cout << endl;<br />
cout << " |===================================|" << endl;<br />
cout << " | KALKULATOR SEDERHANA |" << endl;<br />
cout << " |===================================|" << endl;<br />
cout << " |===================================|" << endl;<br />
cout << " | <a href="http://samsulfti.blogspot.com/">http://samsulfti.blogspot.com/</a> |" << endl;<br />
cout << " |===================================|" << endl;<br />
cout << endl;<br />
cout << " |==================================================================|" << endl;<br />
cout << " [ B ] Menu Pilihan1 kalkulator Biasa ]" << endl;<br />
cout << " [ F ] Menu Untuk Kalkulator fungsi Matematika[sin][cos][tgen][dll] ]" << endl;<br />
cout << " [ ext ] Keluar program ]" << endl;<br />
cout << " |==================================================================|" << endl;<br />
<br />
cout << " Pilih Kalkulator Yang Akan Di Gunakan :";<br />
cin >> opt;<br />
<br />
if ( opt == 'B' ){<br />
pilihan1();<br />
}<br />
else if ( opt == 'F' ){<br />
pilihan2();<br />
}<br />
<br />
else if ( opt == 'ext' ){<br />
exit(0);<br />
}<br />
}<br />
<br />
void KALKULATOR::pilihan1(){<br />
<br />
cout << "Operator Yang Akan Di Gunakan" << endl;<br />
cout << "1. Tambah (+)" << endl;<br />
cout << "2. Kurang (-)" << endl;<br />
cout << "3. Kali (*)" << endl;<br />
cout << "4. Bagi (/)" << endl;<br />
<br />
cout << "Pilih Operator yang akan di gunakan : ";<br />
cin >> opt;<br />
<br />
if ( opt == '+' ){<br />
tambah();<br />
}<br />
else if ( opt == '-' ){<br />
kurang();<br />
}<br />
else if ( opt == '*' ){<br />
kali();<br />
}<br />
else if ( opt == '/' ){<br />
bagi();<br />
}<br />
else {<br />
cout << " Maaf Operator Yang Anda Masukan Tidak Tersedia ";<br />
}<br />
}<br />
<br />
void KALKULATOR::pilihan2(){<br />
<br />
cout << "Operator fungsi matematika" << endl;<br />
cout << "1. Sin [ S ] " << endl;<br />
cout << "2. Cos [ C ]" << endl;<br />
cout << "3. Tan [ T ]" << endl;<br />
cout << "4. log [ L ]" << endl;<br />
cout << "5. log10 [ L10]" << endl;<br />
cout << "6. sqrt [ Sq ]" << endl;<br />
cout << "7. exp [ Ep ]" << endl;<br />
<br />
cout << "Pilih Operator yang akan di gunakan : ";<br />
cin >>opt;<br />
<br />
if ( opt == 'S' ){<br />
sines();<br />
}<br />
else if ( opt == 'C' ){<br />
cosines();<br />
}<br />
else if ( opt == 'Tg' ){<br />
tangen();<br />
}<br />
else if ( opt == 'L' ){<br />
logku();<br />
}<br />
else if ( opt == 'L10' ){<br />
log10ku();<br />
}<br />
else if ( opt == 'Sq' ){<br />
sqrtku();<br />
}<br />
else if ( opt == 'Ep' ){<br />
expku();<br />
}<br />
else {<br />
cout << " Maaf Operator Yang Anda Masukan Tidak Tersedia ";<br />
}<br />
<br />
}<br />
void KALKULATOR::INPUT1(){<br />
cout << "Masukkan bilangan pertama:";<br />
cin >> a;<br />
cout << "Masukkan bilangan kedua:";<br />
cin >> b;<br />
}<br />
<br />
void KALKULATOR::tambah(){<br />
INPUT1();<br />
<br />
hasil0 = a + b;<br />
cout <<"Hasilnya Adalah:"<< hasil0<<endl;<br />
}<br />
<br />
void KALKULATOR::kurang(){<br />
INPUT1();<br />
<br />
hasil0 = a - b;<br />
cout <<"Hasilnya Adalah:"<< hasil0<<endl;<br />
}<br />
<br />
void KALKULATOR::kali(){<br />
INPUT1();<br />
hasil0 = a * b;<br />
cout <<"Hasilnya Adalah:"<< hasil0<<endl;<br />
}<br />
<br />
void KALKULATOR::bagi(){<br />
INPUT1();<br />
hasil0 = a / b;<br />
cout <<"Hasilnya Adalah:"<< hasil0<<endl;<br />
}<br />
<br />
void KALKULATOR::INPUT2(){<br />
cout << "Masukkan bilangan:";<br />
cin >> c;<br />
<br />
}<br />
<br />
void KALKULATOR::sines(){<br />
INPUT2();<br />
hasil1 = sin( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
}<br />
void KALKULATOR::cosines(){<br />
INPUT2();<br />
hasil1 = cos( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
}<br />
void KALKULATOR::tangen(){<br />
INPUT2();<br />
hasil1 = tan( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
}<br />
void KALKULATOR::logku(){<br />
INPUT2();<br />
hasil1 = log( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
}<br />
<br />
void KALKULATOR::log10ku(){<br />
INPUT2();<br />
hasil1 = log10( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
}<br />
<br />
void KALKULATOR::sqrtku(){<br />
INPUT2();<br />
hasil1 = sqrt( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
}<br />
void KALKULATOR::expku(){<br />
INPUT2();<br />
hasil1 = exp( c );<br />
cout <<"Hasilnya Adalah:"<< hasil1<<endl;<br />
} <br />
main(){<br />
KALKULATOR pheewe;<br />
pheewe.MENU();<br />
<br />
system("PAUSE");<br />
return EXIT_SUCCESS;<br />
}sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-63331081251862397912011-04-12T08:05:00.000-07:002011-04-12T08:05:32.850-07:00Program tahun kabisat ( jeliot )import jeliot.io.*;<br />
<br />
public class tahun_kabisat{<br />
int x;<br />
public int bil(int x){<br />
return x;<br />
} <br />
public final void kabisat()<br />
{<br />
int bil;<br />
bil=Input.readInt();<br />
if(bil % 4 == 0)<br />
{<br />
System.out.print("Tahun kabisat.\n");<br />
}<br />
else<br />
{<br />
System.out.print("Tahun bukan kabisat.\n");<br />
}<br />
<br />
System.out.print(bil);<br />
<br />
}<br />
public tahun_kabisat()<br />
{<br />
System.out.print("Program untuk menampilkan tahun kabisat");<br />
System.out.print("\n");<br />
}<br />
}<br />
public class MyClass {<br />
public static void main() {<br />
tahun_kabisat x = new tahun_kabisat();<br />
x.kabisat();<br />
System.out.print("\n");<br />
}<br />
}sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-40946011938058050092011-04-12T08:00:00.000-07:002011-04-12T08:00:42.193-07:00convert C++ to java (jeliot)<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="--> <m:smallfrac m:val="off"> <m:dispdef> <m:lmargin m:val="0"> <m:rmargin m:val="0"> <m:defjc m:val="centerGroup"> <m:wrapindent m:val="1440"> <m:intlim m:val="subSup"> <m:narylim m:val="undOvr"> </m:narylim></m:intlim> </m:wrapindent><!--[endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/> <w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style> <![endif]--> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal"><b><u>C++</u></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">#include <iostream.h><br />
#include <conio.h><br />
<br />
void cetak_array(int A[], int n) {<br />
for (int i=0; i<n; i++)<br />
cout << "Nilai indeks ke-[" << i << "] adalah " << A[ i ] << endl;<br />
getch(); <br />
}<br />
<br />
void main() {<br />
int A[10] = {1,2,3,4,5,6,7,8,9,10};<br />
int n = 10;<br />
cout << "Nilai array asal : ";<br />
cetak_array(A, n);<br />
cout << "Setelah dikurangi 1 menjadi : " << endl;<br />
for (int i=0; i<n; i++)<br />
cout << "Nilai indeks ke-[" << i << "] adalah " << A[ i ]-1 << endl; <br />
getch();<br />
cout << "Nilai array dicetak kembali" << endl;<br />
cetak_array(A, n);<br />
cout << "Ternyata tidak berubah. Perhatikan perbedaannya " << endl; <br />
for (int i=0; i<n; i++)<br />
cout << "Nilai indeks ke-[" << i << "] adalah " << A[ i ]-- << endl; <br />
cout << "Nilai array dicetak kembali" << endl;<br />
cetak_array(A, n);<br />
}</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b><u>Jeliot </u></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">import jeliot.io.*;<br />
<br />
public class myclass {<br />
public void cetak_array(int A[],int n)<br />
{<br />
for (int i =0; i<n; i++)<br />
{<br />
System.out.print("Nilai indeks ke-[");<br />
System.out.print(i);<br />
System.out.print("] adalah ");<br />
System.out.print(A<i>);<br />
System.out.print("\n");<br />
}<br />
<br />
}<br />
<br />
public void nilai_array()<br />
{<br />
int[] A = {1,2,3,4,5,6,7,8,9,10};<br />
int n = 10;<br />
System.out.print("Nilai array asal : ");<br />
cetak_array(A, n);<br />
System.out.print("Setelah dikurangi 1 menjadi : ");<br />
System.out.print("\n");<br />
for (int i =0; i<n; i++)<br />
{<br />
System.out.print("Nilai indeks ke-[");<br />
System.out.print(i);<br />
System.out.print("] adalah ");<br />
System.out.print(A-1);<br />
System.out.print("\n");<br />
}<br />
<br />
System.out.print("Nilai array dicetak kembali");<br />
System.out.print("\n");<br />
cetak_array(A, n);<br />
System.out.print("Ternyata tidak berubah. Perhatikan perbedaannya ");<br />
System.out.print("\n");<br />
for (int i =0; i<n; i++)<br />
{<br />
System.out.print("Nilai indeks ke-[");<br />
System.out.print(i);<br />
System.out.print("] adalah ");<br />
System.out.print(A--);<br />
System.out.print("\n");<br />
}<br />
System.out.print("Nilai array dicetak kembali");<br />
System.out.print("\n");<br />
cetak_array(A, n);<br />
}<br />
private int[] B;<br />
private int x;<br />
<br />
public static void main(){<br />
myclass X = new myclass();<br />
X.nilai_array();<br />
X.cetak_array(B,x);<br />
<br />
}<br />
}</i></div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-33014323688414678992011-04-08T07:52:00.000-07:002011-04-08T07:52:07.122-07:00“Membuat Kalkulator Sederhana di Android”<div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Kali ini saya akan mencoba men-sharing sama teman-teman bagaimana cara membuat kalkulator sederhana di android. Pada kesempatan ini kita aka membuat kalkulator menggunakan radio button, dimana hanya ada satu operator saja yang berfungsi apabila tombol radio button dipilih. Langsung ajah deh.,,.,<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt; vertical-align: baseline;"><!--[if !supportLists]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: Georgia; mso-fareast-font-family: Georgia;"><span style="mso-list: Ignore;">1.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Buat project baru di eclipse, beri nama calcu.java<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt; vertical-align: baseline;"><!--[if !supportLists]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: Georgia; mso-fareast-font-family: Georgia;"><span style="mso-list: Ignore;">2.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Lalu buka file main.xml. Ketikkan script beriku pada file ini :<?xml version=”1.0″ encoding=”utf-8″?><br />
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”<br />
android:orientation=”vertical”<br />
android:layout_width=”fill_parent”<br />
android:layout_height=”fill_parent”<br />
android:background = “@drawable/splash”><o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt; vertical-align: baseline;"><!--[if !supportLists]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: Georgia; mso-fareast-font-family: Georgia;"><span style="mso-list: Ignore;">3.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Kemudian buat file xml baru dengan nama hitung.xml. File ini berfungsi sebagai disain dari program kalkulator yang akan kita buat. Ketikkan script ini pada file hitung.xml :<?xml version=”1.0″ encoding=”utf-8″?><br />
<RelativeLayout<br />
xmlns:android=”http://schemas.android.com/apk/res/android”<br />
android:layout_width=”fill_parent”<br />
android:layout_height=”fill_parent”<br />
android:background = “@drawable/background”><br />
<TextView<br />
android:text=”Masukkan Bilangan Pertama”<br />
android:id=”@+id/TextView01″<br />
android:layout_width=”fill_parent”<br />
android:layout_height=”wrap_content”<br />
android:layout_marginTop = “70px”<br />
android:textColor =”#FF0034″><br />
</TextView><br />
<EditText<br />
android:text=” “<br />
android:id=”@+id/EditTxt1″<br />
android:layout_width=”fill_parent”<br />
android:layout_height=”wrap_content”<br />
android:layout_marginTop =”90px” android:singleLine=”true” android:numeric=”integer|signed|decimal”><br />
</EditText><br />
<TextView<br />
android:layout_width=”fill_parent”<br />
android:layout_height=”wrap_content”<br />
android:text=”Masukkan Bilangan Kedua”<br />
android:id=”@+id/TextView02″<br />
android:layout_below=”@+id/EditTxt1″<br />
android:textColor=”#FF0034″<br />
android:layout_marginTop = “5px”><br />
</TextView> <o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><EditText<br />
android:layout_width=”fill_parent”<br />
android:text=”"<br />
android:layout_height=”wrap_content”<br />
android:layout_below=”@+id/TextView02″<br />
android:id=”@+id/EditTxt2″ android:numeric=”integer|signed|decimal” android:singleLine=”true”><br />
</EditText><br />
<TextView<br />
android:layout_width=”fill_parent”<br />
android:layout_height=”wrap_content”<br />
android:text=”Pilih Operasi”<br />
android:id=”@+id/TextView03″<br />
android:layout_below=”@+id/EditTxt2″<br />
android:textColor = “#FF0034″<br />
android:layout_marginTop = “5px”><br />
</TextView><br />
<RadioGroup<br />
android:id=”@+id/RadioButtonGrp”<br />
android:layout_below=”@+id/EditTxt2″<br />
android:layout_width=”wrap_content”<br />
android:layout_height=”wrap_content”<br />
android:orientation=”horizontal”<br />
android:layout_marginTop = “20px”<br />
android:layout_centerHorizontal=”true” ><br />
<RadioButton<br />
android:text=”+”<br />
android:id=”@+id/Rjumlah”<br />
android:layout_width=”wrap_content”<br />
android:textColor=”#FF0034″<br />
android:layout_height=”wrap_content”></RadioButton><br />
<RadioButtonandroid:text=”-”<br />
android:id=”@+id/Rkurang”<br />
android:textColor=”#FF0034″<br />
android:layout_width=”wrap_content”<br />
android:layout_height=”wrap_content”></RadioButton><br />
<RadioButton<br />
android:text=”*”<br />
android:id=”@+id/Rkali”<br />
android:textColor=”#FF0034″<br />
android:layout_width=”wrap_content”<br />
android:layout_height=”wrap_content”><br />
</RadioButton><br />
<RadioButton<br />
android:text=”/”<br />
android:id=”@+id/Rbagi”<br />
android:textColor=”#FF0034″<br />
android:layout_width=”wrap_content”<br />
android:layout_height=”wrap_content”><br />
</RadioButton><br />
<RadioButton<br />
android:text=”%”<br />
android:id=”@+id/Rmodulus”<br />
android:textColor=”#FF0034″<br />
android:layout_width=”wrap_content”<br />
android:layout_height=”wrap_content”><br />
</RadioButton><br />
</RadioGroup><br />
<Button<br />
android:layout_height=”wrap_content”<br />
android:text=” Calculate “<br />
android:layout_width=”wrap_content”<br />
android:layout_below=”@+id/EditTxt2″<br />
android:id=”@+id/hitung”<br />
android:layout_marginTop = “120px”<br />
android:layout_alignParentRight=”true”><br />
</Button><br />
<EditText<br />
android:layout_width=”75px”<br />
android:text=”"<br />
android:layout_height=”wrap_content”<br />
android:layout_below=”@+id/RadioButtonGrp”<br />
android:id=”@+id/EditTxt3″<br />
android:layout_centerHorizontal=”true”<br />
android:singleLine=”true”<br />
android:numeric=”integer|signed|decimal”<br />
android:layout_marginTop=”10px”<br />
android:textStyle=”bold”<br />
android:gravity=”center”><br />
</EditText><br />
</RelativeLayout><o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt; vertical-align: baseline;"><!--[if !supportLists]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: Georgia; mso-fareast-font-family: Georgia;"><span style="mso-list: Ignore;">4.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Lalu buka file calcu.java yang telah kita buat tadi. Ketikkan script ini pada file calcu.java :<br />
package calcu.android;import android.app.Activity;<br />
import android.os.Bundle;<br />
import android.view.View;<br />
import android.view.View.OnClickListener;<br />
import android.widget.Button;<br />
import android.widget.EditText;<br />
import android.widget.RadioButton;<br />
import android.widget.RadioGroup; <o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">public class calcu extends Activity implements OnClickListener {<br />
// Deklarisasi Variabel<br />
EditText txt1, txt2, txt3;<br />
RadioButton r1, r2, r3, r4, r5;<br />
RadioGroup rgp;<br />
double bil1, bil2, hasil;<br />
Button btn1;<br />
boolean btnr1, btnr2, btnr3, btnr4,btnr5;<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">/** Called when the activity is first created. */<br />
@Override<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
setContentView(R.layout.hitung);<br />
// Proses Inisialisasi<br />
// Tombol hitung<br />
btn1 = (Button) findViewById(R.id.hitung);<br />
btn1.setOnClickListener(this);<br />
// Inputan bilangan pertama<br />
txt1 = (EditText) findViewById(R.id.EditTxt1);<br />
txt1.getText();<br />
// Inputan bilangan kedua<br />
txt2 = (EditText) findViewById(R.id.EditTxt2);<br />
txt2.getText();<br />
// Outputan hasil perhitungan<br />
txt3 = (EditText) findViewById(R.id.EditTxt3);<br />
txt3.getText();<br />
// Operator perhitungan<br />
rgp = (RadioGroup) findViewById(R.id.RadioButtonGrp);<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">r1 = (RadioButton) findViewById(R.id.Rjumlah);<br />
r1.setOnClickListener(this);<br />
r2 = (RadioButton) findViewById(R.id.Rkurang);<br />
r2.setOnClickListener(this);<br />
r3 = (RadioButton) findViewById(R.id.Rkali);<br />
r3.setOnClickListener(this);<br />
r4 = (RadioButton) findViewById(R.id.Rbagi);<br />
r4.setOnClickListener(this);<br />
r5 = (RadioButton) findViewById(R.id.Rmodulus);<br />
r5.setOnClickListener(this);<br />
}<br />
@Override<br />
public void onClick(View v) {<br />
// TODO Auto-generated method stub<br />
// Proses inisialisasi dan pengambilan data bil1 dan bil2<br />
bil1 = Double.valueOf((String.valueOf(txt1.getText())));<br />
bil2 = Double.valueOf((String.valueOf(txt2.getText())));<br />
//Proses perhitungan aritmatikanya :<br />
//Penjumlahan<br />
if (v==r1) {<br />
btnr1 = true;<br />
btnr2 = false;<br />
btnr3 = false;<br />
btnr4 = false;<br />
btnr5 = false;<br />
//Pengurangan<br />
} else if (v==r2) {<br />
btnr1 = false;<br />
btnr2 = true;<br />
btnr3 = false;<br />
btnr4 = false;<br />
btnr5 = false;<br />
} else if (v==r3) {<br />
btnr1 = false;<br />
btnr2 = false;<br />
btnr3 = true;<br />
btnr4 = false;<br />
btnr5 = false;<br />
}else if (v==r4) {<br />
btnr1 = false;<br />
btnr2 = false;<br />
btnr3 = false;<br />
btnr4 = true;<br />
btnr5 = false;<br />
}else if (v==r5) {<br />
btnr1 = false;<br />
btnr2 = false;<br />
btnr3 = false;<br />
btnr4 = false;<br />
btnr5 = true;<br />
}<br />
if (v == btn1) {<br />
if (btnr1 == true) {<br />
hasil = bil1 + bil2;<br />
}else if(btnr2==true){<br />
hasil = bil1 – bil2;<br />
}else if (btnr3==true) {<br />
hasil = bil1 * bil2;<br />
}else if (btnr4==true) {<br />
hasil = bil1 / bil2;<br />
}else if (btnr5==true) {<br />
hasil = bil1 % bil2;<br />
}<br />
txt3.setText(“” + hasil);<br />
}<br />
}<br />
}<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt; vertical-align: baseline;"><!--[if !supportLists]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: Georgia; mso-fareast-font-family: Georgia;"><span style="mso-list: Ignore;">5.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Kemudian tambahkan splash screen pada program ini, agar pada saat program dijalankan tidak langsung masuk ke aplikasi. Buat class baru dengan nama splash.java dan ketikkan script ini pada file tersebut :<br />
package calcu.android;import android.app.Activity;<br />
import android.content.Context;<br />
import android.content.Intent;<br />
import android.os.Bundle; <o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">public class splash extends Activity {<br />
protected boolean active = true;<br />
protected int splashTime = 3000;<br />
public static int time =25;<br />
Context ctx=this;<br />
/** Called when the activity is first created. */<br />
@Override<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
setContentView(R.layout.main);<br />
Thread splashThread = new Thread(){<br />
@Override<br />
public void run (){<br />
try{<br />
int waited=0;<br />
while (active &&(waited < splashTime)){<br />
sleep(100);<br />
if(active){<br />
waited +=100;<br />
}<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}<br />
}catch (InterruptedException e){<br />
}finally{<br />
finish();<br />
Intent i=new Intent(ctx,calcu.class);<br />
startActivity(i);<br />
stop();<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 18.0pt; margin-bottom: 18.0pt; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;"><span style="color: #333333; font-family: "Georgia","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">}<br />
};<br />
splashThread.start();<br />
}<br />
}<o:p></o:p></span></div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-765333382946777122011-03-28T09:24:00.000-07:002011-03-28T09:24:43.277-07:00Keyboard komputer terbaru dan tercanggih 2011<div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;">2011 Terbaru Tercanggih</span></span><span class="apple-converted-space"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"> </span></span><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;">-</span></span><span class="apple-converted-space"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"> </span></span><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><span style="text-decoration: none;">Informasi terbaru</span></span></span><span class="apple-converted-space"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"> </span></span><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;">untuk Anda penggila teknologi kali ini telah hadir</span></span><span class="apple-converted-space"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"> </span></span><span class="apple-style-span"><i><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;">keyboard komputer terbaru dan tercanggih 2011 </span></i></span><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;">yang harus Anda miliki karena beberapa fitur kecanggihan teknologinya belum ada pada keyboard biasa.</span><o:p></o:p></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><br />
</span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-RTjz0yd_Qxtrehwh-ImRJ51GXHvYtA-dFDO3euTu7By7zbTYtAS1vUmp7j3qneQ4ujbEXEn_9qYrS4K4zzXWnmCHWAWlFIkq8GH3HqGnKEBD88kChBCKsrREMzLYSnbGzUHdHyJ8K_o/s400/Keyboard+Komputer+2011.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-RTjz0yd_Qxtrehwh-ImRJ51GXHvYtA-dFDO3euTu7By7zbTYtAS1vUmp7j3qneQ4ujbEXEn_9qYrS4K4zzXWnmCHWAWlFIkq8GH3HqGnKEBD88kChBCKsrREMzLYSnbGzUHdHyJ8K_o/s320/Keyboard+Komputer+2011.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><br />
</span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><br />
</span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><b>Keyboard Komputer 2011 Terbaru Tercanggih</b></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><br />
<span class="apple-style-span">Produsen: Logitech - Nama Keyboard</span><span class="apple-converted-space"> </span></span><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><i><b>Logitech G15</b></i></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><br />
<span class="apple-style-span">Kelebihan: Software SDK memungkinkan penyesuaian luas fungsi keyboard.</span><br />
<span class="apple-style-span">Kekurangan: Keyboard game 2011 ini tidak memiliki beberapa tambahan kecil, seperti warna latar kustom.</span><br />
<span class="apple-style-span">Keputusan: G15 sangat seimbang karena memiliki semua fitur utama yang gamer gunakan.</span><o:p></o:p></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><span class="apple-style-span"><br />
</span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jfK_P13dkic9RC885psN4J-_oEks4B0t4_8Fu-D-GBzFRAir9bRzirIkn7ZhwTRagxluWr87eMNCrFVnm_Qerl1h2KmTcvWvUb_XHM1_sraWkLLVXMdvOfc_1qP4nVD8VW2cmwBc_sE/s400/Keyboard+Komputer+Tercanggih.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jfK_P13dkic9RC885psN4J-_oEks4B0t4_8Fu-D-GBzFRAir9bRzirIkn7ZhwTRagxluWr87eMNCrFVnm_Qerl1h2KmTcvWvUb_XHM1_sraWkLLVXMdvOfc_1qP4nVD8VW2cmwBc_sE/s320/Keyboard+Komputer+Tercanggih.jpg" width="236" /></a></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><span class="apple-style-span"><br />
</span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><span class="apple-style-span"><br />
</span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><b>Spesifikasi Logitech G15 Keyboard Komputer 2011 Terbaru Tercanggih</b></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><br />
<span class="apple-style-span"><br />
</span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><span class="apple-style-span"><u>General</u></span><br />
<span class="apple-style-span">* Device Type Keyboard</span><br />
<span class="apple-style-span">* Form Factor External</span><br />
<span class="apple-style-span">* Localization English: US</span><br />
<span class="apple-style-span"><u>Input Device</u></span><br />
<span class="apple-style-span">* Interface USB</span><br />
<span class="apple-style-span">* Connectivity Technology Wired</span><br />
<span class="apple-style-span">* Buttons Qty 6</span><br />
<span class="apple-style-span">* Features Palm rest , LCD display</span><br />
<span class="apple-style-span">* Key/Button Function Multimedia , Programmable </span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><span class="apple-style-span"></span><span class="apple-style-span"><u>Expansion / Connectivity</u></span><br />
<span class="apple-style-span">* Expansion Slot(s) None</span><br />
<span class="apple-style-span">* Interfaces None</span><br />
<span class="apple-style-span">* Connections 1 x USB - 4 pin USB Type A</span><br />
<span class="apple-style-span"><u>Miscellaneous</u></span><br />
<span class="apple-style-span">* Cables Included 1 x USB cable</span><br />
<span class="apple-style-span">* Microsoft Certifications Works with Windows Vista</span><br />
<span class="apple-style-span"><u>Software / System Requirements</u></span><br />
<span class="apple-style-span">* Software Included Drivers & Utilities</span><br />
<span class="apple-style-span">* OS Required Microsoft Windows XP , Microsoft Windows Vista</span><br />
<span class="apple-style-span">* System Requirements Details Windows XP - RAM 256 MB - HD 20 MB , Windows Vista - RAM 256 B - HD 20 MB</span><br />
<span class="apple-style-span"><u>Manufacturer Warranty</u></span><br />
<span class="apple-style-span">* Service & Support 1 year warranty</span><br />
<span class="apple-style-span">* Service & Support Details Limited warranty - 1 year</span><br />
<span class="apple-style-span"><u>Cable(s) / Peripheral(s)</u></span><br />
<span class="apple-style-span">* Cable(s) Included 1 USB cable</span><br />
<span class="apple-style-span"><u>Interface(s) Required</u></span><br />
<span class="apple-style-span">* Port(s) / Connector(s) Required 1 USB 4 pin USB Type A</span><br />
<span class="apple-style-span"><u>Interface Provided</u></span><br />
<span class="apple-style-span">* Port(s) Total (Free) None</span><br />
<span class="apple-style-span"><u>Warranty</u></span><br />
<span class="apple-style-span">* Service / Support Details Limited warranty 1 year</span><br />
<span class="apple-style-span"><u>Expansion Slot(s)</u></span><br />
<span class="apple-style-span">* Slot(s) Provided None</span><o:p></o:p></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoz0yPQJTYGRf33jKSA9JO7Iy_7RzKLMiwo2To-HSt2E55FNOgGThepzG8-L6AVZJMOwwokCS6A2LrRNBBhalPMWTSuReVQGONrt07yu2w0Zpu1NkVyzAp13CkDrv3PNZ-G8URlrfoNxM/s400/Keyboard+Komputer+Terbaru.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoz0yPQJTYGRf33jKSA9JO7Iy_7RzKLMiwo2To-HSt2E55FNOgGThepzG8-L6AVZJMOwwokCS6A2LrRNBBhalPMWTSuReVQGONrt07yu2w0Zpu1NkVyzAp13CkDrv3PNZ-G8URlrfoNxM/s320/Keyboard+Komputer+Terbaru.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><o:p><br />
</o:p></span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="apple-style-span"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 24px;"><o:p><br />
</o:p></span></span></div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div class="MsoNormal" style="line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><a name='more'></a>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-44430204944012790722011-03-28T06:53:00.000-07:002011-03-28T06:53:18.280-07:00Program menghitung volume dan luas bola<span class="Apple-style-span" style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21px;"></span><br />
<div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Di dalam program ini di jelaskan tentang penghitungan volume dan luas bola,program di bawah saya menggunakan borland C++ builder..</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include<iostream.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#define phi 3.14</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">int main(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">float Luas,Volume;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">float r;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”Masukan jari-jari bola”;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>r;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Luas = 4* phi * r * r;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Volume = 4/3 * phi * r*r*r;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”Luas Bola = “<<Luas<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”Volume Bola = “<<Volume<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">return 0;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">berikut adalah hasil dari debug atau run-nya :</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYrMaWslDvpau_YzgouscunvcG1-8wxIND6jy8VBddzBP9VSOtIWzxGTteuajRudI1Smfu4U13vFAL-Ip2qWUrAhLLy_Bh4dlmkdN8jApV38xgzAcc3EKRXo_sdK_zyCnWif1Ej7e-KA/s1600/untitled.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYrMaWslDvpau_YzgouscunvcG1-8wxIND6jy8VBddzBP9VSOtIWzxGTteuajRudI1Smfu4U13vFAL-Ip2qWUrAhLLy_Bh4dlmkdN8jApV38xgzAcc3EKRXo_sdK_zyCnWif1Ej7e-KA/s320/untitled.jpg" width="320" /></a></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-11975628364138924452011-03-28T06:52:00.000-07:002011-03-28T06:52:00.589-07:00Contoh progam menghitung nilai rata-rata<span class="Apple-style-span" style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21px;"></span><br />
<div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">berikut ini contoh program untuk menghitung nilai rata-rata,,dalam program tersebut saya menggunakan borland C++ builder..</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include <iostream.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include <conio.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void main()</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">{</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">float a,b,c;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">float hasil;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”PROGRAM HITUNG NILAI RATA-RATA”<<endl<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”Nilai Pertandingan I : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>a;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”Nilai Pertandingan II : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>b;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”Nilai Pertandingan III : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>c;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">hasil = (a+b+c) / 3;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”\nRata-rata Nilai adalah : “<<hasil;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">getch();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">berikut adalah hasil debug atau run-nya :</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqQZu6cn8E7fv6FBVBOKHSDcbvD-hSeIUCqwY49l9bVgjBWLP_7Xts-pmc2vJ5r1HkGXWdiCZTYZgpA4y760w_a65CKjr6Ibfki7xIRGQskG46nycCSEB-PLNOoAnhkjJseVVM10OWLw/s1600/untitled1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqQZu6cn8E7fv6FBVBOKHSDcbvD-hSeIUCqwY49l9bVgjBWLP_7Xts-pmc2vJ5r1HkGXWdiCZTYZgpA4y760w_a65CKjr6Ibfki7xIRGQskG46nycCSEB-PLNOoAnhkjJseVVM10OWLw/s320/untitled1.jpg" width="320" /></a></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com1tag:blogger.com,1999:blog-3147360277486537871.post-12992067520214516912011-03-28T06:49:00.000-07:002011-03-28T06:49:48.250-07:00Program menghitung jumlah deret<span class="Apple-style-span" style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21px;"></span><br />
<div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">berikut ini merupakan salah satu contoh program untuk menghitung jumlah deret..</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include <iostream.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include <conio.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">class deret{</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">friend ostream&operator<<(ostream&,deret&);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">friend istream&operator>>(istream&,deret&);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">public:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">long hitung(int);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void cetak(int);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">private:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">int suku_n;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">long hasil;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">};</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">long deret::hitung(int n){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">if(n==1)return 1;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">else return n+hitung(n-1);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void deret::cetak(int n){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">if (n>0){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cetak(n-1);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”suku ke : “<<n<<”=”<<hitung(n)<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">istream&operator>>(istream&input,deret& x){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”masukan integer : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">input>>x.suku_n;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">return input;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">ostream&operator<<(ostream&output,deret&x){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">output<<”jumlah deret : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">for (int i=1;i<=x.suku_n;i++)</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">if(i==x.suku_n)</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<i<<” adalah”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">else cout<<i<<”n “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.cetak(x.suku_n);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">return output;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void main(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">deret bilangan;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>bilangan;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<bilangan<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">system(“PAUSE”);</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">berikut adalah hasil dari debug atau run-nya :</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinItCT5F-09Unm6vYPmscEYmWpPrpSvZJdkBSfMOPuHAtKEQlQdVCCxbqzlWxjuwVfVynRh4RbVz1O_VyPG15tCBiYVYRfBju-CNcc_LxFvpAJ8QkxI-_1mhsTZQCojKdVYC4e4PwGSg/s1600/untitled2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinItCT5F-09Unm6vYPmscEYmWpPrpSvZJdkBSfMOPuHAtKEQlQdVCCxbqzlWxjuwVfVynRh4RbVz1O_VyPG15tCBiYVYRfBju-CNcc_LxFvpAJ8QkxI-_1mhsTZQCojKdVYC4e4PwGSg/s320/untitled2.jpg" width="320" /></a></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-13198927779512544152011-03-28T06:47:00.000-07:002011-03-28T06:47:52.425-07:00Program mengkonversi mata uang<span class="Apple-style-span" style="color: #333333; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21px;"></span><br />
<div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Dalam program ini menjelaskan cara meng-konversi beberapa mata uang…</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">ni program yang suka menghitung-hitung uang nih… <img alt=":D" class="wp-smiley" src="http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif?m=1216490401g" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 100%; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include <iostream.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">#include <conio.h></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">class konversi{</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">public:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi_rupiah();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi_dolar();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi_euro();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void cetak1();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void cetak2();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void cetak3();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">float uang,rupiah,euro,dolar;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">};</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void main(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">int pil;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">konversi x;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”masukan pilihan anda\n”</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><<”\n1. untuk konversi rupiah”</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><<”\n2. untuk konversi dolar”</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><<”\n3. untuk konversi eouro\n”</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><<”\nmasukan pilihan anda : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>pil;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">switch(pil){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">case 1:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”jumlah uang yang anda inginkan : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>x.uang;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.konversi_rupiah();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.cetak1();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">break;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">case 2:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”jumlah uang yang anda inginkan : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>x.uang;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.konversi_dolar();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.cetak2();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">break;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">case 3:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”jumlah uang yang anda inginkan : “;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cin>>x.uang;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.konversi_euro();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">x.cetak3();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">break;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">default:</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<”maaf anda salah memasukan kode….!”;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">getch();</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi::konversi_rupiah(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">dolar=uang/9400;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">euro=uang/12000;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi::konversi_dolar(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">rupiah=uang*9400;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">euro=uang*1.2;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi::konversi_euro(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">dolar=uang/1.2;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">rupiah=uang*12000;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi::cetak1(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<euro<<”euoro”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<dolar<<”dolar”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi::cetak2(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<euro<<”euro”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<rupiah<<”rupiah”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">void konversi::cetak3(){</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<dolar<<”dolar”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">cout<<rupiah<<”rupiah”<<endl;</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">}</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">dan berikut merupakan hasil debug atau run-nya :</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK0wHZPU-mL88gBJvDk5HGNgjHpOFuzPHQqOB2vGwSu18xCbjSm8xmFMwOdWX9aMl7eJol_O6-gx2Sn3PjuiFD1LxpF6DdNFXhVi5UgsT54QMCDHgt5ZcaFN0awJosZIPLBN27nNGJvQ/s1600/untitled3.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK0wHZPU-mL88gBJvDk5HGNgjHpOFuzPHQqOB2vGwSu18xCbjSm8xmFMwOdWX9aMl7eJol_O6-gx2Sn3PjuiFD1LxpF6DdNFXhVi5UgsT54QMCDHgt5ZcaFN0awJosZIPLBN27nNGJvQ/s320/untitled3.jpg" width="320" /></a></div><div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-44298346235364190442010-10-26T07:46:00.000-07:002010-10-26T07:46:56.569-07:00QUEUE / ANTRIAN <span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 15px; line-height: 0px;"> </span><br />
<div class="MsoNormal"><b><span lang="EN-US" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">Queue Dengan Array<o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-left: 36.0pt; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt; text-indent: -18.0pt;"></div><ul><li><span lang="EN-US" style="font-family: Wingdings; font-size: 11.0pt; line-height: 4%; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="DE" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ansi-language: DE; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">Bersifat FIFO (First In First Out)</span></li>
<li><span lang="EN-US" style="font-family: Wingdings; font-size: 11.0pt; line-height: 4%; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="DE" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ansi-language: DE; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">Elemen yang <b>pertama masuk</b> ke antrian akan <b>keluar pertama</b> kalinya</span></li>
<li><span lang="EN-US" style="font-family: Wingdings; font-size: 11.0pt; line-height: 4%; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="DE" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ansi-language: DE; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">DEQUEUE adalah mengeluarkan satu elemen dari suatu Antrian</span></li>
<li><span lang="EN-US" style="font-family: Wingdings; font-size: 11.0pt; line-height: 4%; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="DE" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ansi-language: DE; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">Antrian dapat dibuat dengan menggunakan: Liniear Array dan Circular Array</span></li>
<li><span lang="EN-US" style="font-family: Wingdings; font-size: 11.0pt; line-height: 4%; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="DE" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ansi-language: DE; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">Terdapat satu buah pintu masuk di suatu ujung dan satu buah pintu keluar di ujung satunya</span><span lang="EN-US" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">.</span><span lang="DE" style="font-family: "Arial","sans-serif"; font-size: 11.0pt; line-height: 4%; mso-ansi-language: DE; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin;">Sehingga membutuhkan 2 variabel: Head dan Tail</span></li>
</ul><!--[if !supportLists]--><br />
<div class="MsoNormal" style="margin-left: 36.0pt;"><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: medium;"><span class="Apple-style-span" style="font-size: 15px; line-height: 0px;"><br />
</span></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><br />
</div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Contoh : <o:p></o:p></span></b></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; margin-left: 72.0pt; mso-list: l1 level2 lfo1; mso-pagination: widow-orphan; tab-stops: list 72.0pt; text-align: left; text-indent: -18.0pt;"></div><ul><li><span lang="EN-US" style="color: black; font-family: Wingdings; font-size: 11.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt; mso-no-proof: yes;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Penjualan karcis kereta, bioskop</span></li>
<li><span lang="EN-US" style="color: black; font-family: Wingdings; font-size: 11.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt; mso-no-proof: yes;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Penjadualan pencetakan (spooling system)</span></li>
<li><span lang="EN-US" style="color: black; font-family: Wingdings; font-size: 11.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt; mso-no-proof: yes;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Penjadualan pemakaian CPU</span></li>
<li><span lang="EN-US" style="color: black; font-family: Wingdings; font-size: 11.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt; mso-no-proof: yes;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Pemakaian I/O pada sistem komputer</span></li>
<li><span lang="EN-US" style="color: black; font-family: Wingdings; font-size: 11.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt; mso-no-proof: yes;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Penyimpan barang di Apotek</span></li>
</ul><!--[if !supportLists]--><br />
<div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><br />
</div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin; mso-no-proof: yes;">Contoh program queue<o:p></o:p></span></b></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><br />
</div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">#include "queue01.h"<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">#include <iostream.h><o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.4pt; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">int array [QUEUE_SIZE];<br />
int awal=-1;<br />
int akhir=-1;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.15pt; mso-pagination: widow-orphan; text-align: left; text-indent: -30.35pt;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; letter-spacing: -.1pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">int is_empty(){<br />
if ((awal==-1)&&(akhir==-1))<br />
return 1;<br />
else<br />
return 0;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}int is_full(){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.3pt; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; letter-spacing: -.1pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">if(akhir==QUEUE_SIZE-1)<br />
return 1;<br />
else<br />
return 0;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}void enqueue_item(int item){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">if(!is_full()){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.05pt; mso-pagination: widow-orphan; text-align: left; text-indent: -14.9pt;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">if(awal==-1){<br />
awal++;<br />
akhir++;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}<span style="letter-spacing: -.1pt;">else</span><o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">akhir++;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">array[akhir]=item;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}else<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cout<<"full";<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}char dequeue_item(void){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.05pt; mso-pagination: widow-orphan; text-align: left; text-indent: -15.25pt;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">if(!is_empty()){<br />
awal++;<br />
cout<<"\n first out"<<endl;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}else<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cout<<"empty";<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">void print_item(){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.15pt; mso-pagination: widow-orphan; text-align: left; text-indent: -15.25pt;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">if(!is_empty()){<br />
for(int i =awal;i<=akhir;i++)<br />
cout<<array[i];<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}else<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cout<<"empty";<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}int main(){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">int item;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cout<<"BAB I, queue."<<endl;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.3pt; mso-pagination: widow-orphan; text-align: left; text-indent: 22.8pt;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">int pilih;<br />
do{<br />
cout<<"\nmenu"<<endl;<br />
cout<<"1.add queue"<<endl;<br />
cout<<"2.delete queue"<<endl;<br />
cout<<"3.print"<<endl;<br />
cout<<"4.exit"<<endl;<br />
cin>>pilih;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">switch (pilih){<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">case 1:<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cout<<"insert<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">new<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">data=";<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cin>>item;enqueue_item(item); break;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">case 2:<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">dequeue_item(); break;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">case 3:<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">cout<<"\nQueue<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">contains"<<endl;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">print_item();<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">break;<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: normal; mso-pagination: widow-orphan; text-align: left;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">case 4: system("cls"); cout<<"\tBye";<o:p></o:p></span></div><div align="left" class="MsoNormal" style="background: white; line-height: 14.3pt; mso-pagination: widow-orphan; text-align: left; text-indent: 7.55pt;"><span lang="EN-US" style="color: black; font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-fareast-font-family: "MS Pゴシック"; mso-font-kerning: 0pt; mso-hansi-theme-font: major-latin;">}<br />
}while(pilih<=3);<br />
return 0;<br />
}<o:p></o:p></span></div><div class="MsoNormal"><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-89703900299325717782010-10-11T04:06:00.000-07:002010-10-11T04:06:09.862-07:00STACK<div class="MsoNormal"><span class="ff5"><b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: Arial;">Sifat STACK / TUMPUKAN<o:p></o:p></span></b></span></div><div class="MsoNormal"><br />
</div><ul style="margin-top: 0in;" type="disc"><li class="MsoNormal" style="mso-list: l2 level1 lfo1; tab-stops: list .5in;"><span class="ff5"><span style="color: black; font-family: Arial;">Stack adalah kumpulan komponen yang</span> </span><span style="font-family: Arial;">tersusun dari sederetan item atau obyek.<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l2 level1 lfo1; tab-stops: list .5in;"><span class="ff5"><span style="color: black; font-family: Arial;">Penambahan atau pengurangan item</span> </span><span style="font-family: Arial;">hanya dapat dilakukan di satu ujung saja<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l2 level1 lfo1; tab-stops: list .5in;"><span style="font-family: Arial;"></span>m<span class="ff5"><span style="color: black;">enyisipkan atau menghapus item</span> </span>mengikuti aturan<span class="apple-converted-space"><span style="color: black;"><span style="word-spacing: -.06em;"> </span></span><span class="ff0"><span style="color: black;">LIFO l(Last In First Out</span>)</span></span><o:p></o:p></li>
</ul><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-family: Arial;">Contoh STACK<o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><ul style="margin-top: 0in;" type="disc"><li class="MsoNormal" style="mso-list: l3 level1 lfo2; tab-stops: list .5in;"><span style="font-family: Arial;">Tumpukan kertas<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l3 level1 lfo2; tab-stops: list .5in;"><span style="font-family: Arial;">Tumpukan piring<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l3 level1 lfo2; tab-stops: list .5in;"><span style="font-family: Arial;">Tumpukan kardus<o:p></o:p></span></li>
</ul><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-family: Arial;">Operasi STACK<o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><ul style="margin-top: 0in;" type="disc"><li class="MsoNormal" style="mso-list: l0 level1 lfo3; tab-stops: list .5in;"><span style="font-family: Arial;">Push () sesuatu ke top dari Stack<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo3; tab-stops: list .5in;"><span style="font-family: Arial;">Pop () sesuatu keluar Stack dari urutan top<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo3; tab-stops: list .5in;"><span style="font-family: Arial;">Top ()/peek () menampilkan sesuatu yang ada di atas Stack<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo3; tab-stops: list .5in;"><span style="font-family: Arial;">Is empty : cek apakah stack itu kosong<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo3; tab-stops: list .5in;"><span style="font-family: Arial;">Size : mencari jumlah elemen yang telah dimasukkan ke dalam stack<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l0 level1 lfo3; tab-stops: list .5in;"><span style="font-family: Arial;">Is full : cek apakah stack itu kosong<o:p></o:p></span></li>
</ul><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-family: Arial;">Implementasi Stack ada 3<o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><ul style="margin-top: 0in;" type="disc"><li class="MsoNormal" style="mso-list: l1 level1 lfo4; tab-stops: list .5in;"><span style="font-family: Arial;">Implementasi cotiguous : Masukkan data di simpan dalam array. Data diakses menggunakan indeks<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo4; tab-stops: list .5in;"><span style="font-family: Arial;">Implementasi Linked : Masukkan data disimpan dengan Linked list. Diakses menggunakan reference<o:p></o:p></span></li>
<li class="MsoNormal" style="mso-list: l1 level1 lfo4; tab-stops: list .5in;"><span style="font-family: Arial;">Implementasi Array : Elemen ditambah dari indeks terkecil menuju ke lebih besar. Memiliki elemen untuk menyimpan posisi indeks elemen teratas<o:p></o:p></span></li>
</ul><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-family: Arial;">Implementasi kelas Stack :<o:p></o:p></span></b></div><div class="MsoNormal" style="line-height: 12.0pt;"><br />
</div><div class="MsoNormal" style="line-height: 12.0pt;"><span style="color: black; font-family: Arial;">class Stack<o:p></o:p></span></div><div class="plff5" style="line-height: 15.5pt; margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: Arial;">{<br />
private int maxSize;<br />
private char[ ] dataStack;<br />
private int top;<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 12.0pt;"><span style="color: black; font-family: Arial;">public Stack(int s) // constructor<o:p></o:p></span></div><div class="plff5" style="line-height: 15.5pt; margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: Arial;">{<br />
maxSize = s;<br />
stackArray = new char[maxSize];<br />
top = -1;<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 12.0pt;"><span style="color: black; font-family: Arial;">}<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span style="font-family: Arial;">}<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-28493541318110330752010-10-10T21:18:00.001-07:002010-10-10T21:18:51.685-07:00pretest 2 jawaban no.1<br />
public:<br />
kompleks(T s=0): a(s){} // jawaban no.1<br />
kompleks(T s=0, T t=0 ): a(s), b(t) {}<br />
void cetak();<br />
kompleks operator-()<br />
kompleks operator-(const kompleks<T>&);<br />
kompleks operator+(const kompleks<T>&);<br />
private:<br />
T a;<br />
T b;<br />
};<br />
<br />
<br />
jawaban no.2. <br />
template <class T><br />
<br />
kompleks<T> operasi<T>::kali(const kompleks<T>& m, const kompleks<T>& n){<br />
kompleks<T> temp;<br />
temp.a=(m.a*n.a) + (m.b*n.b);<br />
temp.b=(m.a*m.b) + (m.b*n.a);<br />
return temp;<br />
}<br />
<br />
template <class T><br />
<br />
kompleks<T> operasi<T>::kali(const kompleks<T>& x, const kompleks<T>& y){<br />
kompleks<T> temp;<br />
temp.a=(m.a*n.a) + (m.b*n.b);<br />
temp.b=(m.a*m.b) + (m.b*n.a);<br />
return temp;<br />
}sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-5740924623587711942010-10-10T21:10:00.000-07:002010-10-10T21:10:32.724-07:00INTHERIACE DALAM C++ (Bil_Float)<span style="font-size: small;"></span><span style="font-size: small;">#include <cstdlib><br />
#include <iostream><br />
using namespace std;<br />
class Bilangan{<br />
<br />
friend ostream& operator<<(ostream&, const Bilangan&);<br />
friend istream& operator>>(istream&, Bilangan&);<br />
public:<br />
Bilangan(int a0=0,float b0=0.0):a(a0),b(b0){}<br />
void banding_int(const Bilangan&, const Bilangan&);<br />
Bilangan& operator=(const Bilangan&);<br />
Bilangan operator+(const Bilangan&)const;<br />
Bilangan operator-()const;<br />
protected:<br />
int a;<br />
float b;<br />
};<br />
ostream& operator<<(ostream& out, const Bilangan& x)<br />
{<br />
out<<"Bagian integer: "<<x.a<<endl;<br />
out<<"Bagian float : "<<x.b<<endl;<br />
return out;<br />
}<br />
void Bilangan::banding_int(const Bilangan&x, const Bilangan& y)<br />
{<br />
if(x.a>y.a)cout<<x.a<<"::x lebih besar dari"<<y.a<<"::y";<br />
else cout<<x.a<<"::x lebih kecil dari"<<y.a<<"::y";<br />
}<br />
<br />
Bilangan& Bilangan::operator=(const Bilangan& x)<br />
{<br />
a=x.a;<br />
b=x.b;<br />
return *this;<br />
}<br />
<br />
istream& operator>>(istream& in, Bilangan& x)<br />
{<br />
cout<<"\nMasuk bagian integer:";<br />
in>>x.a;<br />
cout<<"Masuk bagian float :";<br />
in>>x.b;<br />
return in;<br />
}<br />
<br />
Bilangan Bilangan::operator+(const Bilangan& x)const<br />
{Bilangan cc;<br />
cc.a=a+x.a;<br />
cc.b=b+x.b;<br />
return cc;<br />
}<br />
<br />
<br />
Bilangan Bilangan::operator-()const<br />
{Bilangan x;<br />
x.a=-a;<br />
x.b=-b;<br />
return x;<br />
}<br />
<br />
class Bil_char:public Bilangan {<br />
friend ostream& operator << (ostream&, const Bil_char&);<br />
public:<br />
Bil_char(int a0=0, int b0=0, char ch='x'):Bilangan(a0,b0),c(ch){}<br />
private:<br />
char c;<br />
};<br />
ostream& operator <<(ostream& out, const Bil_char& x){<br />
<br />
out<<"bagian Integer : "<<x.a<<endl;<br />
out<<"bagian float : "<<x.b<<endl;<br />
out<<"bagian Char : "<<x.c<<endl;<br />
return out;<br />
}<br />
<br />
int main(){<br />
<br />
system("color 1a");<br />
Bilangan s,t(-2,3.14),d;<br />
cout<<"Nilai awal s\n"<<s;<br />
cout<<"Nilai awal t dari deklarasi\n"<<t;<br />
s=t;<br />
cout<<"Setelah s di-assign t\n";<br />
cout<<"Nilai s\n"<<s;<br />
cout<<"masukan nilai-nilai object d";<br />
cin>>d;<br />
cout<<"setelah d+t=> \n"<<d+t;<br />
cout<<"Nilai d dinegatifkan\n"<<-d;<br />
Bil_char ss;<br />
cout<<"Nilai awal ss\n"<<ss;<br />
}<br />
<br />
</span>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-84133536657506062602010-10-04T14:44:00.001-07:002010-10-04T14:53:12.169-07:00kapan yah punya komputer gini???<span class="Apple-style-span" style="color: #222222; font-family: georgia, 'palatino linotype', palatino, 'times new roman', times, serif; font-size: 13px; line-height: 18px;"></span><br />
<h2 style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: georgia, 'palatino linotype', palatino, 'times new roman', times, serif; font: normal normal normal 1em/1em 'palatino linotype', palatino, 'times new roman', times, serif; letter-spacing: -1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><b><span class="Apple-style-span" style="font-size: x-large;">Alienware Aurora ALX – komputer PC gaming</span></b></h2><div><b><span class="Apple-style-span" style="font-size: x-large;"><br />
</span></b></div><div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="font-size: x-large;"><i>Harganya mulai $2,299. Spesifikasi komputer desktop Dell Alienware Aurora ALX bisa ditingkatkan, tentunya dengan harga yang semakin mahal</i>.</span><br />
<span class="Apple-style-span" style="font-size: x-large;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-large;"><br />
</span></div><div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><img alt="komputerdesktopDellalienwareauroraa Komputer super untuk main game" class="aligncenter" height="270" src="http://i233.photobucket.com/albums/ee246/blogberita/komputerdesktopDellalienwareauroraa.jpg" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(170, 170, 170); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(170, 170, 170); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(170, 170, 170); border-top-style: solid; border-top-width: 1px; display: block; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="pc alienware" width="320" /></div><div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><img alt="komputerdesktopDellalienwareauro 1 Komputer super untuk main game" class="aligncenter" height="518" src="http://i233.photobucket.com/albums/ee246/blogberita/komputerdesktopDellalienwareauro-1.jpg" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(170, 170, 170); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(170, 170, 170); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(170, 170, 170); border-top-style: solid; border-top-width: 1px; display: block; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="komputer dell alienware" width="468" /></div><div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><img alt="komputerdesktopDellalienwareauro 2 Komputer super untuk main game" class="aligncenter" height="278" src="http://i233.photobucket.com/albums/ee246/blogberita/komputerdesktopDellalienwareauro-2.jpg" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(170, 170, 170); border-left-width: 1px; border-right-color: rgb(170, 170, 170); border-right-width: 1px; border-style: initial; border-top-color: rgb(170, 170, 170); border-top-style: solid; border-top-width: 1px; display: block; font-size: 13px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;" title="alienware pc gaming" width="320" /></div><h2 style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: georgia, 'palatino linotype', palatino, 'times new roman', times, serif; font: normal normal normal 1em/1em 'palatino linotype', palatino, 'times new roman', times, serif; letter-spacing: -1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><b><span class="Apple-style-span" style="font-size: x-large;"><br />
</span></b></h2><h2 style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: georgia, 'palatino linotype', palatino, 'times new roman', times, serif; font: normal normal normal 1em/1em 'palatino linotype', palatino, 'times new roman', times, serif; letter-spacing: -1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline;"><span class="Apple-style-span" style="font-size: x-large;"><i><br />
</i></span></h2><h2 style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: georgia, 'palatino linotype', palatino, 'times new roman', times, serif; font: normal normal normal 1em/1em 'palatino linotype', palatino, 'times new roman', times, serif; letter-spacing: -1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline;"><span class="Apple-style-span" style="font-size: x-large;"><i><br />
</i></span></h2><h2 style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: georgia, 'palatino linotype', palatino, 'times new roman', times, serif; font: normal normal normal 1em/1em 'palatino linotype', palatino, 'times new roman', times, serif; letter-spacing: -1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline;"><span class="Apple-style-span" style="font-size: x-large;"><i>Alienware M15x – laptop tercepat Dell untuk bermain game.</i></span><span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: xx-large; letter-spacing: normal; line-height: normal;"><i>Laptop atau notebook haruslah kecil dan ringan, sehingga mudah dibawa-bawa. Produk terbaru Dell ini justru sebaliknya: besar, tebal, dan berat. Harga mulai $1,500 atau Rp15 juta.</i></span></h2><div><br />
</div>sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0tag:blogger.com,1999:blog-3147360277486537871.post-74170784424964051062010-10-02T12:46:00.001-07:002010-10-02T12:46:46.019-07:00new blogwelcome to my blog....sam_zhoelhttp://www.blogger.com/profile/12518057705942025594noreply@blogger.com0