tag:blogger.com,1999:blog-47219459123876874652024-03-06T13:17:01.649+07:00InformatikaYusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-4721945912387687465.post-49282567724474548302011-12-23T21:53:00.001+07:002011-12-23T21:58:43.414+07:00SISTEM INFORMASI TOKO BUKU<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<div class="MsoNormal">Pada Kesempatan kali ini kelompok saya mencoba untuk membuat Tugas Proyek yaitu SISTEM INFORMASI TOKO BUKU. Jadi cara kerja aplikasi ini adalah terdapat menu yang didalamnya ada Pembelian, Penjualan, Data buku, dll. Untuk lebih jelasnya langsung saja lihat dan jalan kan aplikasi ini, kami juga sudah mempersiapkan petunjuk penggunaannya. Berikut adalah tampilan awal dari program kami:<br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPrcs5X9HAYjcV_eeZcvEDSYIXeO2O6G0MC87gdf-dnMwnm-bVCI2dPB5ZCCgL0-N4Ms094M-5clD4udu2H943f2Jl6cOciRenlCu6dQTOAwm-WvZMvXpF3jhc8D6Wf1yVYJB7t31MRyg/s1600/menu.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="321" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPrcs5X9HAYjcV_eeZcvEDSYIXeO2O6G0MC87gdf-dnMwnm-bVCI2dPB5ZCCgL0-N4Ms094M-5clD4udu2H943f2Jl6cOciRenlCu6dQTOAwm-WvZMvXpF3jhc8D6Wf1yVYJB7t31MRyg/s640/menu.jpg" width="640" /></a></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Silahkan <a href="http://www.4shared.com/rar/7-EenMeu/Sistem_Informasi_Toko_Buku.html">Download Disini.</a><br />
Semoga Bermanfaat...Terimakasihh...</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com6tag:blogger.com,1999:blog-4721945912387687465.post-54709769329635925922011-06-30T16:20:00.002+07:002011-07-08T16:55:34.456+07:00Factorial<span class="" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">O</span></span><span class="" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">n</span> <span class="hps" title="Klik untuk terjemahan alternatif">this occasion I</span> <span class="hps" title="Klik untuk terjemahan alternatif">will</span> <span class="hps" title="Klik untuk terjemahan alternatif">try to</span> <span class="hps" title="Klik untuk terjemahan alternatif">create a program</span> <span class="hps" title="Klik untuk terjemahan alternatif">to</span> <span class="hps" title="Klik untuk terjemahan alternatif">find</span> <span class="hps" title="Klik untuk terjemahan alternatif">factorial</span><span title="Klik untuk terjemahan alternatif">.</span> <span class="hps" title="Klik untuk terjemahan alternatif">before</span> <span class="hps" title="Klik untuk terjemahan alternatif">I</span> <span class="hps" title="Klik untuk terjemahan alternatif">will</span> <span class="hps" title="Klik untuk terjemahan alternatif">explain</span> <span class="hps" title="Klik untuk terjemahan alternatif">the meaning of</span> <span class="hps" title="Klik untuk terjemahan alternatif">the</span> <span class="hps" title="Klik untuk terjemahan alternatif">factorial</span><span class="" title="Klik untuk terjemahan alternatif">.</span></span><span class="" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif"> Factorial</span> <span class="hps" title="Klik untuk terjemahan alternatif">is the</span> <span class="hps" title="Klik untuk terjemahan alternatif">result</span> <span class="hps" title="Klik untuk terjemahan alternatif">of the</span> <span class="hps" title="Klik untuk terjemahan alternatif">multiplication</span> <span class="hps" title="Klik untuk terjemahan alternatif">of positive integers</span> <span class="hps" title="Klik untuk terjemahan alternatif">from</span> <span class="hps" title="Klik untuk terjemahan alternatif">1 to</span> <span class="hps" title="Klik untuk terjemahan alternatif">n is called</span> <span class="hps" title="Klik untuk terjemahan alternatif">n</span> <span class="hps" title="Klik untuk terjemahan alternatif">factorial</span> <span class="hps" title="Klik untuk terjemahan alternatif">is written</span> <span class="hps" title="Klik untuk terjemahan alternatif">n!</span><br />
<span class="hps" title="Klik untuk terjemahan alternatif">so</span> <span class="hps" title="Klik untuk terjemahan alternatif">n</span><span title="Klik untuk terjemahan alternatif">!</span> <span class="hps" title="Klik untuk terjemahan alternatif">=</span> <span class="hps" title="Klik untuk terjemahan alternatif">1.2.3</span> <span class="hps" title="Klik untuk terjemahan alternatif">...</span><span title="Klik untuk terjemahan alternatif">.</span> <span class="hps" title="Klik untuk terjemahan alternatif">...</span> <span class="hps" title="Klik untuk terjemahan alternatif">..</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">N</span><span title="Klik untuk terjemahan alternatif">-2</span><span title="Klik untuk terjemahan alternatif">)</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">n</span><span title="Klik untuk terjemahan alternatif">-1)</span><span title="Klik untuk terjemahan alternatif">.</span> <span class="hps" title="Klik untuk terjemahan alternatif">N</span><span class="" title="Klik untuk terjemahan alternatif">, and</span> <span class="hps" title="Klik untuk terjemahan alternatif">0!</span> <span class="hps" title="Klik untuk terjemahan alternatif">= 1</span></span><br />
<div class="g-section" id="gt-res-tools"><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">This</span> <span class="hps" title="Klik untuk terjemahan alternatif">is the</span> <span class="hps" title="Klik untuk terjemahan alternatif">sourcecode:</span></span><br />
</div><div class="g-section" id="gt-res-tools"></div><div class="g-section" id="gt-res-tools"><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">#include <iostream.h><br />
<a name='more'></a>#include <math.h><br />
#include <conio.h><br />
<br />
int faktorial(int a);<br />
main()<br />
{<br />
int n;<br />
clrscr();<br />
cout << "Masukkan bilangan : ";<br />
cin >> n;<br />
cout << "Faktorial" << n <<" = " << faktorial(n);<br />
getch();<br />
}<br />
int faktorial (int a)<br />
{ int hasil;<br />
if(a<=1)<br />
{hasil=1; }<br />
else<br />
{ hasil=a*faktorial(a-1); }<br />
return(hasil);<br />
} </span></span></div><br />
<div class="g-section" id="gt-res-tools"><span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">This</span> <span class="hps" title="Klik untuk terjemahan alternatif">is the</span> <span class="hps" title="Klik untuk terjemahan alternatif">view after</span> <span class="hps" title="Klik untuk terjemahan alternatif">the</span> <span class="hps" title="Klik untuk terjemahan alternatif">writing</span> <span class="hps" title="Klik untuk terjemahan alternatif">on the</span> <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html"><blink>Borland C++:</blink></a></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE9bC6KuzZtQHnz9uvCSXO27b5MeSzNwDFobZq0yMih5NqQP276K19v5MdJ2AVKw2YjATDXCAV6bXUXqAkhkAj7pLp3JrNFqNBN4XpK584Z8V387ZmlRD5pyF5kLBPUuhbkgVk6rfzoWI/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE9bC6KuzZtQHnz9uvCSXO27b5MeSzNwDFobZq0yMih5NqQP276K19v5MdJ2AVKw2YjATDXCAV6bXUXqAkhkAj7pLp3JrNFqNBN4XpK584Z8V387ZmlRD5pyF5kLBPUuhbkgVk6rfzoWI/s320/sourcecode.jpg" width="320" /></a></div><span class="long_text" id="result_box" lang="en"><blink></blink></span><span class="long_text" id="result_box" lang="en"><br />
</span><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif"></span></span></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-77149149400188524632011-06-21T12:57:00.001+07:002011-07-08T13:28:28.989+07:00Encryption and Description<span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">Encryption</span> <span class="hps" title="Klik untuk terjemahan alternatif">is</span> <span class="hps" title="Klik untuk terjemahan alternatif">a process</span> <span class="hps" title="Klik untuk terjemahan alternatif">safety</span> <span class="hps" title="Klik untuk terjemahan alternatif">of a</span> <span class="hps" title="Klik untuk terjemahan alternatif">hidden data</span> <span class="hps" title="Klik untuk terjemahan alternatif">or</span> <span class="hps" title="Klik untuk terjemahan alternatif">data conversion process</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">plaintext</span><span title="Klik untuk terjemahan alternatif">)</span> <span class="hps" title="Klik untuk terjemahan alternatif">into a form that</span> <span class="hps" title="Klik untuk terjemahan alternatif">can not be read</span> <span class="hps" title="Klik untuk terjemahan alternatif">/</span> <span class="hps" title="Klik untuk terjemahan alternatif">understood</span><span title="Klik untuk terjemahan alternatif">.</span> <span class="hps" title="Klik untuk terjemahan alternatif">While</span> <span class="hps" title="Klik untuk terjemahan alternatif">Decryption</span> <span class="hps" title="Klik untuk terjemahan alternatif">is</span> <span class="hps" title="Klik untuk terjemahan alternatif">the reverse of</span> <span class="hps" title="Klik untuk terjemahan alternatif">the encryption process</span> <span class="hps" title="Klik untuk terjemahan alternatif">is</span> <span class="hps" title="Klik untuk terjemahan alternatif">the process of</span> <span class="hps" title="Klik untuk terjemahan alternatif">converting</span> <span class="hps" title="Klik untuk terjemahan alternatif">data that</span> <span class="hps" title="Klik untuk terjemahan alternatif">is encrypted</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">ciphertext</span><span title="Klik untuk terjemahan alternatif">) back</span> <span class="hps" title="Klik untuk terjemahan alternatif">into</span> <span class="hps" title="Klik untuk terjemahan alternatif">the original</span> <span class="hps" title="Klik untuk terjemahan alternatif">data</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">plaintext</span> <span class="hps" title="Klik untuk terjemahan alternatif">Original</span><span title="Klik untuk terjemahan alternatif">)</span> <span class="hps" title="Klik untuk terjemahan alternatif">so it can</span> <span class="hps" title="Klik untuk terjemahan alternatif">be read</span> <span class="hps" title="Klik untuk terjemahan alternatif">/</span> <span class="hps" title="Klik untuk terjemahan alternatif">understood</span> <span class="hps" title="Klik untuk terjemahan alternatif">again</span><span title="Klik untuk terjemahan alternatif">.</span><br />
<span class="hps" title="Klik untuk terjemahan alternatif">Messages that</span> <span class="hps" title="Klik untuk terjemahan alternatif">are encrypted</span> <span class="hps" title="Klik untuk terjemahan alternatif">plaintext</span> <span class="hps" title="Klik untuk terjemahan alternatif">which is exemplified</span> <span class="hps" title="Klik untuk terjemahan alternatif">called</span> <span class="hps" title="Klik untuk terjemahan alternatif">plaintext</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">P</span><span title="Klik untuk terjemahan alternatif">)</span><span title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">the encryption process</span> <span class="hps" title="Klik untuk terjemahan alternatif">is exemplified</span> <span class="hps" title="Klik untuk terjemahan alternatif">encryption</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">E</span><span title="Klik untuk terjemahan alternatif">)</span><span title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">let's say the</span> <span class="hps" title="Klik untuk terjemahan alternatif">decryption</span> <span class="hps" title="Klik untuk terjemahan alternatif">process of</span> <span class="hps" title="Klik untuk terjemahan alternatif">decryption</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">D</span><span title="Klik untuk terjemahan alternatif">)</span><span title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">and</span> <span class="hps" title="Klik untuk terjemahan alternatif">the message</span> <span class="hps" title="Klik untuk terjemahan alternatif">is</span> <span class="hps" title="Klik untuk terjemahan alternatif">called</span> <span class="hps" title="Klik untuk terjemahan alternatif">ciphertext</span> <span class="hps" title="Klik untuk terjemahan alternatif">which is exemplified</span> <span class="hps" title="Klik untuk terjemahan alternatif">encrypted</span> <span class="hps" title="Klik untuk terjemahan alternatif">ciphertext</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">C</span><span title="Klik untuk terjemahan alternatif">)</span></span><br />
<div class="g-section" id="gt-res-tools"><div class="trans-listen-button gt-icon-c" id="gt-res-listen" role="button" style="-moz-user-select: none; display: none;"><span class="gt-icon"></span><span class="gt-icon-text">Simak</span></div><div class="trans-roman-button gt-icon-c" id="gt-res-roman" role="button" style="-moz-user-select: none; display: none;"><span class="gt-icon"></span><span class="gt-icon-text">Baca secara fonetik</span></div></div><div class="g-section" id="gt-res-tools"><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">This</span> <span class="hps" title="Klik untuk terjemahan alternatif">is the</span> <span class="hps" title="Klik untuk terjemahan alternatif">sourcecode:</span></span></div><div class="g-section" id="gt-res-tools"><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif"><a name='more'></a></span></span></div><div class="g-section" id="gt-res-tools">#include <cstdlib><br />
#include <iostream><br />
<br />
using namespace std;<br />
<br />
int main(int argc, char *argv[])<br />
{<br />
char p1, c1, hasil, plain;<br />
int key;<br />
<br />
cout<<"\tII**********************************************II\n";<br />
cout<<"\tII Program untuk Mencari Enkripsi dan Deskripsi II\n";<br />
cout<<"\tII II\n"; <br />
cout<<"\tII**********************************************II\n";<br />
cout<<"\n"; <br />
for (int i=1; i<=128; i++){<br />
key=1;<br />
hasil=i;<br />
cout<<i<<"="<<hasil<<endl;<br />
} <br />
cout<<"masukkan kata :";<br />
cin>>plain;<br />
cout<<"masukkan niali key :";<br />
cin>>key;<br />
<br />
p1 = (plain+key)%128;<br />
c1 = (plain-key)%128;<br />
<br />
cout<<"hasil enkripsi :"<<p1<<endl;<br />
cout<<"hasil deskripsi :"<<c1<<endl;<br />
<br />
system("PAUSE");<br />
return EXIT_SUCCESS;<br />
}</div><div class="g-section" id="gt-res-tools"><br />
</div><div class="g-section" id="gt-res-tools"><span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">This</span> <span class="hps" title="Klik untuk terjemahan alternatif">is the</span> <span class="hps" title="Klik untuk terjemahan alternatif">view after</span> <span class="hps" title="Klik untuk terjemahan alternatif">the</span> <span class="hps" title="Klik untuk terjemahan alternatif">writing</span> <span class="hps" title="Klik untuk terjemahan alternatif">on the</span> <a href="http://www.blogger.com/goog_1817671836"><span class="hps" title="Klik untuk terjemahan alternatif">Dev</span> <span class="hps" title="Klik untuk terjemahan alternatif">C</span> </a><span class="hps" title="Klik untuk terjemahan alternatif"><a href="http://www.4shared.com/file/Q7MAmTzk/devcpp-4992_setup.html">+ +</a>:</span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2B5ZVKPuTAewI7LzVY26bPe9SIFHoRw45cYJuyvJh1WsrolERyEgI6FwDbGS6O5obMz26-fHUZvYihiiVOF4vzO6lbzD9W-AOmc5SD8oHnYmIxMpHiFrOudDQ0BovRvRKnTe53wjcdIs/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2B5ZVKPuTAewI7LzVY26bPe9SIFHoRw45cYJuyvJh1WsrolERyEgI6FwDbGS6O5obMz26-fHUZvYihiiVOF4vzO6lbzD9W-AOmc5SD8oHnYmIxMpHiFrOudDQ0BovRvRKnTe53wjcdIs/s400/sourcecode.jpg" width="400" /></a></div><div class="g-section" id="gt-res-tools"><span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif"> </span></span></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-55705840735295232092011-06-18T12:05:00.002+07:002011-07-08T12:55:21.174+07:00Combinations and Permutations<span class="long_text" id="result_box"><span style="background-color: white;" title="PERMUTASI"></span></span><span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">COMBINATION</span><br />
<span class="hps" title="Klik untuk terjemahan alternatif">The difference</span> <span class="hps" title="Klik untuk terjemahan alternatif">between</span> <span class="hps" title="Klik untuk terjemahan alternatif">permutation</span> <span class="hps" title="Klik untuk terjemahan alternatif">and</span> <span class="hps" title="Klik untuk terjemahan alternatif">combination</span> <span class="hps" title="Klik untuk terjemahan alternatif">problem</span> <span class="hps" title="Klik untuk terjemahan alternatif">lies in</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">"</span><span class="" title="Klik untuk terjemahan alternatif">the order</span> <span class="hps" title="Klik untuk terjemahan alternatif">or</span> <span class="hps" title="Klik untuk terjemahan alternatif">the position of</span><span title="Klik untuk terjemahan alternatif">"</span> <span class="hps" title="Klik untuk terjemahan alternatif">preparation</span> <span class="hps" title="Klik untuk terjemahan alternatif">of a group of</span> <span class="hps" title="Klik untuk terjemahan alternatif">objects</span><span title="Klik untuk terjemahan alternatif">.</span> <span class="hps" title="Klik untuk terjemahan alternatif">In a</span> <span class="hps" title="Klik untuk terjemahan alternatif">permutation</span> <span class="hps" title="Klik untuk terjemahan alternatif">problem of</span> <span class="hps" title="Klik untuk terjemahan alternatif">sequence</span> <span class="hps" title="Klik untuk terjemahan alternatif">or</span> <span class="hps" title="Klik untuk terjemahan alternatif">position to be</span> <span class="hps" title="Klik untuk terjemahan alternatif">very</span> <span class="hps" title="Klik untuk terjemahan alternatif">important</span><span class="" title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">whereas</span> <span class="hps" title="Klik untuk terjemahan alternatif">in combination</span> <span class="hps" title="Klik untuk terjemahan alternatif">are not concerned with</span> <span class="hps" title="Klik untuk terjemahan alternatif">the order</span> <span class="hps" title="Klik untuk terjemahan alternatif">or position</span> <span class="hps" title="Klik untuk terjemahan alternatif">of the</span> <span class="hps" title="Klik untuk terjemahan alternatif">group</span> <span class="hps" title="Klik untuk terjemahan alternatif">object.</span><br />
<span class="hps" title="Klik untuk terjemahan alternatif">On the</span> <span class="hps" title="Klik untuk terjemahan alternatif">permutation</span> <span class="hps" title="Klik untuk terjemahan alternatif">sequence of</span> <span class="hps" title="Klik untuk terjemahan alternatif">objects</span> <span class="hps" title="Klik untuk terjemahan alternatif">XYZ</span><span title="Klik untuk terjemahan alternatif">;</span> <span class="hps" title="Klik untuk terjemahan alternatif">XZY</span><span title="Klik untuk terjemahan alternatif">;</span> <span class="hps" title="Klik untuk terjemahan alternatif">ZYX</span> <span class="hps" title="Klik untuk terjemahan alternatif">is</span> <span class="hps" title="Klik untuk terjemahan alternatif">different,</span> <span class="hps" title="Klik untuk terjemahan alternatif">but</span> <span class="hps" title="Klik untuk terjemahan alternatif">for</span> <span class="hps" title="Klik untuk terjemahan alternatif">the combination of</span> <span class="hps" title="Klik untuk terjemahan alternatif">these</span> <span class="hps" title="Klik untuk terjemahan alternatif">sequences</span> <span class="hps" title="Klik untuk terjemahan alternatif">are considered equal</span><span title="Klik untuk terjemahan alternatif">.</span> <span class="hps" title="Klik untuk terjemahan alternatif">Thus</span> <span class="hps" title="Klik untuk terjemahan alternatif">the combination of</span> <span class="hps" title="Klik untuk terjemahan alternatif">the</span> <span class="hps" title="Klik untuk terjemahan alternatif">method of electing</span> <span class="hps" title="Klik untuk terjemahan alternatif">the object</span> <span class="hps" title="Klik untuk terjemahan alternatif">in question</span> <span class="hps" title="Klik untuk terjemahan alternatif">without taking into consideration</span> <span class="hps" title="Klik untuk terjemahan alternatif">the sequence</span> <span class="hps" title="Klik untuk terjemahan alternatif">of</span> <span class="hps" title="Klik untuk terjemahan alternatif">the object.</span> <span class="hps" title="Klik untuk terjemahan alternatif">To calculate</span> <span class="hps" title="Klik untuk terjemahan alternatif">the number</span> <span class="hps" title="Klik untuk terjemahan alternatif">of</span> <span class="hps" title="Klik untuk terjemahan alternatif">combinations</span> <span class="hps" title="Klik untuk terjemahan alternatif">of</span> <span class="hps" title="Klik untuk terjemahan alternatif">objects</span> <span class="hps" title="Klik untuk terjemahan alternatif">can be</span> <span class="hps" title="Klik untuk terjemahan alternatif">formulated</span><span class="" title="Klik untuk terjemahan alternatif">:</span> <span class="hps" title="Klik untuk terjemahan alternatif">nCx</span> <span class="hps" title="Klik untuk terjemahan alternatif">=</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">n!</span><span class="atn" title="Klik untuk terjemahan alternatif">) / (</span><span title="Klik untuk terjemahan alternatif">x!</span> <span class="hps atn" title="Klik untuk terjemahan alternatif">(</span><span title="Klik untuk terjemahan alternatif">nx</span><span title="Klik untuk terjemahan alternatif">)</span><span title="Klik untuk terjemahan alternatif">!</span><span title="Klik untuk terjemahan alternatif">),</span> <span class="hps" title="Klik untuk terjemahan alternatif">Where n</span><span title="Klik untuk terjemahan alternatif">:</span> <span class="hps" title="Klik untuk terjemahan alternatif">number of</span> <span class="hps" title="Klik untuk terjemahan alternatif">all objects</span> <span class="hps" title="Klik untuk terjemahan alternatif">that exist</span><span class="" title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">and</span> <span class="hps" title="Klik untuk terjemahan alternatif">x</span><span class="" title="Klik untuk terjemahan alternatif">: the number of</span> <span class="hps" title="Klik untuk terjemahan alternatif">objects</span> <span class="hps" title="Klik untuk terjemahan alternatif">in combination</span><span title="Klik untuk terjemahan alternatif">.</span><br />
<span class="hps" title="Klik untuk terjemahan alternatif">Value of</span> <span class="hps" title="Klik untuk terjemahan alternatif">x</span> <span class="hps atn" title="Klik untuk terjemahan alternatif"><</span><span title="Klik untuk terjemahan alternatif">n</span> <span class="hps" title="Klik untuk terjemahan alternatif">and</span> <span class="hps" title="Klik untuk terjemahan alternatif">if x</span> <span class="hps" title="Klik untuk terjemahan alternatif">=</span> <span class="hps" title="Klik untuk terjemahan alternatif">n</span> <span class="hps" title="Klik untuk terjemahan alternatif">formulation</span> <span class="hps" title="Klik untuk terjemahan alternatif">into</span> <span class="hps" title="Klik untuk terjemahan alternatif">nCn</span> <span class="hps" title="Klik untuk terjemahan alternatif">=</span> <span class="hps" title="Klik untuk terjemahan alternatif">1.</span></span><br />
<br />
PERMUTATIONS Permutation is a compilation of existing objects into a specific sequence. Things to note in the permutation is that the objects that exist must be "indistinguishable" from each other. Permutation can be formulated: nPx = (n!) / (n-x)! ; Where n = number of all objects, and x = number of objects dipermutasikan. Values of n and x each must be greater than zero. If the value of x <n is called a permutation of Part Object. If the value of x = n, then it is called permutation Whole Object, so the formula can be simplified into: nPx = n! .<br />
<br />
The following is the sourcecode of the program combinations and permutations:<br />
<a name='more'></a><br />
<span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">#include <iostream.h><br />
#include <stdio.h><br />
#include <conio.h><br />
long int fak (long int x);<br />
void main()<br />
{<br />
int n,r, Prts,pilihan,p;<br />
char ulang;<br />
do<br />
{<br />
clrscr();<br />
cout<<"KOMBINASI DAN PERMUTASI"<<endl;<br />
cout<<"1. KOMBINASI"<<endl;<br />
cout<<"2. PERMUTASI"<<endl;<br />
cout<<"3. KELUAR"<<endl;<br />
cout<<"Pilihan Anda : ";cin>>pilihan;<br />
switch (pilihan)<br />
{<br />
case 1 :<br />
cout<<" Program Menghitung Kombinasi";<br />
cout<<endl;<br />
cout<<" Masukkan Nilai n : "; cin>>n;<br />
cout<<" Masukkan Nilai r : "; cin>>r;<br />
if (n>r){<br />
Prts = fak(n)/(fak(n-r)*fak (r));<br />
cout<<endl;<br />
printf(" Kombinasinya adalah: %d",Prts);<br />
cout<<endl; }<br />
else if (n<r){<br />
cout<<"data tak valid";}<br />
cout<<endl ;<br />
break;<br />
case 2 :<br />
cout<<" Program Menghitung Permutasi";<br />
cout<<endl;<br />
cout<<" Masukkan Nilai n : "; cin>>n;<br />
cout<<" Masukkan Nilai r : "; cin>>r;<br />
if (n>r){<br />
Prts = fak (n)/fak(n-r);<br />
cout<<endl;<br />
<br />
printf(" Permutasinya adalah: %d",Prts);<br />
cout<<endl; }<br />
else if (n<r){<br />
cout<<"data tak valid";}<br />
cout<<endl ;<br />
break;<br />
case 3 :<br />
cout<<"KELUAR"<<endl;<br />
break;<br />
default:<br />
cout<<"Menu tidak tersedia"<<endl;<br />
break;<br />
}<br />
cout<<"Kembali ke Menu Utama (y/n)?";cin>>ulang;<br />
}while(ulang == 'y');<br />
}<br />
getch();<br />
long int fak (long int n)<br />
{<br />
int f;<br />
if (n<=1)<br />
{<br />
f=1;<br />
}<br />
else<br />
{<br />
f=n*fak(n-1);<br />
}<br />
return (f);<br />
}</span></span><span class="long_text" id="result_box"><span title="."> </span></span><br />
<span class="long_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">The following</span> <span class="hps" title="Klik untuk terjemahan alternatif">display</span> <span class="hps" title="Klik untuk terjemahan alternatif">after</span> <span class="hps" title="Klik untuk terjemahan alternatif">the</span> <span class="hps" title="Klik untuk terjemahan alternatif">writing</span> <span class="hps" title="Klik untuk terjemahan alternatif">on the</span> <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html"><span class="hps" title="Klik untuk terjemahan alternatif">Borland</span> <span class="hps" title="Klik untuk terjemahan alternatif">C</span> <span class="hps" title="Klik untuk terjemahan alternatif">+ +</span></a> :</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitC8ZVcSIDo3XtcEt-2-3VRTLRL6-j5vwIU0Acmf6hCXLpAoG3W6KslJA1uNnvnq-0c53dzE4BM76yYDlYobmhFK6HWnvfLrQ-fCFptUn17GVGbbWB_TqpQZoP_TKsYY9-aMpTEJz0nk/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitC8ZVcSIDo3XtcEt-2-3VRTLRL6-j5vwIU0Acmf6hCXLpAoG3W6KslJA1uNnvnq-0c53dzE4BM76yYDlYobmhFK6HWnvfLrQ-fCFptUn17GVGbbWB_TqpQZoP_TKsYY9-aMpTEJz0nk/s640/sourcecode.jpg" width="331" /></a></div><span class="long_text" id="result_box" lang="en">R</span><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">esults after</span> <span class="hps" title="Klik untuk terjemahan alternatif">the</span> <span class="hps" title="Klik untuk terjemahan alternatif">run:</span></span><br />
<span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif"><b>Combinations Program</b> </span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTb0n2hAlVQ0aUI7QRgt7fPTu2Jnlika-QtUzbmEoI0O6e50-5fJ5w7Du0078fiWaw2dzz0JdPAErlNCArc86cizvo7_B9WocB3BMi8W1FcsvkAcR2rU5Gu9Xsz2IL-FNwDkKIqNZyg5M/s1600/kombinasi.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTb0n2hAlVQ0aUI7QRgt7fPTu2Jnlika-QtUzbmEoI0O6e50-5fJ5w7Du0078fiWaw2dzz0JdPAErlNCArc86cizvo7_B9WocB3BMi8W1FcsvkAcR2rU5Gu9Xsz2IL-FNwDkKIqNZyg5M/s400/kombinasi.jpg" width="400" /></a></div><br />
<b><span class="long_text short_text" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">Permutations Program</span></span></b><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt0geaPUei8Ff4FF9amE8mp7gtt9zgOV0xeFTGC4WCb9T1KuCgA284y947s-mAnpXpq5i0wkKSlEUZTZTWHxdw6MvsjBAOzu0podej2eQUNhgQzk95_Vjnn6Kx6_bwRXSCPJEparlzQGg/s1600/permutasi.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt0geaPUei8Ff4FF9amE8mp7gtt9zgOV0xeFTGC4WCb9T1KuCgA284y947s-mAnpXpq5i0wkKSlEUZTZTWHxdw6MvsjBAOzu0podej2eQUNhgQzk95_Vjnn6Kx6_bwRXSCPJEparlzQGg/s400/permutasi.jpg" width="400" /></a></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-83471504234496835912011-06-15T21:10:00.002+07:002011-07-08T09:06:31.592+07:00Identity Matrix<span class="" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">On</span> <span class="hps" title="Klik untuk terjemahan alternatif">this occasion I</span> <span class="hps" title="Klik untuk terjemahan alternatif">will</span> <span class="hps" title="Klik untuk terjemahan alternatif">post the</span> <span class="hps" title="Klik untuk terjemahan alternatif">program</span> <span class="hps" title="Klik untuk terjemahan alternatif">on</span> <span class="hps" title="Klik untuk terjemahan alternatif">the following</span> <span class="hps" title="Klik untuk terjemahan alternatif">matrix</span> <span class="hps" title="Klik untuk terjemahan alternatif">identity</span> <span class="hps" title="Klik untuk terjemahan alternatif">is a little</span> <span class="hps" title="Klik untuk terjemahan alternatif">explanation</span> <span class="hps" title="Klik untuk terjemahan alternatif">from me</span><span class="" title="Klik untuk terjemahan alternatif">, the notion</span> <span class="hps" title="Klik untuk terjemahan alternatif">of</span> <span class="hps" title="Klik untuk terjemahan alternatif">the identity</span> <span class="hps" title="Klik untuk terjemahan alternatif">matrix</span> <span class="hps" title="Klik untuk terjemahan alternatif">is a</span> <span class="hps" title="Klik untuk terjemahan alternatif">matrix whose</span> <span class="hps" title="Klik untuk terjemahan alternatif">diagonal elements</span><span class="hps" title="Klik untuk terjemahan alternatif"> main</span> <span class="hps" title="Klik untuk terjemahan alternatif">equal to 1</span><span class="" title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">while</span> <span class="hps" title="Klik untuk terjemahan alternatif">other elements have</span> <span class="hps" title="Klik untuk terjemahan alternatif">the same</span><span class="hps" title="Klik untuk terjemahan alternatif"> with 0</span><span class="" title="Klik untuk terjemahan alternatif">.</span></span><br />
<span class="" id="result_box" lang="en"><span class="hps" title="Klik untuk terjemahan alternatif">we just</span> <span class="hps" title="Klik untuk terjemahan alternatif">created</span> <span class="hps" title="Klik untuk terjemahan alternatif">the program</span><span title="Klik untuk terjemahan alternatif">,</span> <span class="hps" title="Klik untuk terjemahan alternatif">and</span> <span class="hps" title="Klik untuk terjemahan alternatif">the following</span> <span class="hps" title="Klik untuk terjemahan alternatif">source code</span><span title="Klik untuk terjemahan alternatif">:</span></span><br />
<br />
<span class="" id="result_box" lang="en"><span title="Klik untuk terjemahan alternatif">#include <iostream.h><br />
#include <conio.h><br />
<a name='more'></a>int main()<br />
{<br />
int a[99] [99];<br />
int i, j, n;<br />
cout << "nilai n: ";<br />
cin >> n;<br />
for ( i = 0; i <= n; i++ )<br />
{<br />
for ( j = 0; j <= n; j++ )<br />
if ( i == j )<br />
a[i] [j] = 1;<br />
else<br />
a[i] [j] = 0;<br />
}<br />
for ( i = 0; i < n; i++ )<br />
{<br />
for ( j = 0; j < n; j++ )<br />
cout << a[i] [j];<br />
cout << endl;<br />
}<br />
getch();<br />
} </span></span><br />
<br />
<span class="long_text" id="result_box"><span style="background-color: white;" title="tampilan setelah ditulis pada borland C++ adalah sebagai berikut:">Display after it was written in <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C + +</a> are as follows: </span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc6Hb0b2XnGBmtcfk6Q7xrR7glp8m4mACpnIqbf2i8xLtLxsPf__yRh1qxBu8Utr5qmO2MuG-JBbVArY2G3jqukMYvwOOR08Z2L6BWXDU5dg7UDpPQffiMRX145Q4xJQIt0ebZS2PaLFw/s1600/matrik+identitas.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc6Hb0b2XnGBmtcfk6Q7xrR7glp8m4mACpnIqbf2i8xLtLxsPf__yRh1qxBu8Utr5qmO2MuG-JBbVArY2G3jqukMYvwOOR08Z2L6BWXDU5dg7UDpPQffiMRX145Q4xJQIt0ebZS2PaLFw/s320/matrik+identitas.jpg" width="320" /></a></div><span class="long_text" id="result_box"><span style="background-color: white;" title="tampilan setelah ditulis pada borland C++ adalah sebagai berikut:"> hopefully this program can be useful matrix identity and thanks ^_^</span></span><br />
<span class="long_text" id="result_box"><span style="background-color: white;" title="tampilan setelah ditulis pada borland C++ adalah sebagai berikut:"><br />
</span></span><br />
<span class="" id="result_box" lang="en"><span title="Klik untuk terjemahan alternatif"> </span></span><span class="" id="result_box" lang="en"><span class="" title="Klik untuk terjemahan alternatif"> </span></span>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-81185363861477645652011-06-14T20:08:00.001+07:002011-07-06T23:24:23.611+07:00Matrix Tranpose<div dir="ltr" style="text-align: left;" trbidi="on"><div>Matrix tranpose understanding is obtained from the moving elements of the row elements become columns and vice versa, moving the elements into elements of a column in the row.<br />
The following is the sourcecode:<br />
<br />
#include <iostream.h><br />
#include <conio.h><br />
<a name='more'></a><span style="background-color: white;"></span> void main()</div> {<br />
<div> clrscr();<br />
int a[10][10],m,n,i,j;<br />
cout<<"Enter number of rows: ";<br />
cin>>m;<br />
cout<<"Enter number of coloumns: ";<br />
cin>>n;<br />
<br />
if(m!=n)<br />
{<br />
cout<<"Matrix not square so Transpose not possible :(";<br />
}<br />
else<br />
{<br />
cout<<endl<<"Enter elements of matrix: "<<endl;<br />
for(i=0;i<m;i++)<br />
{<br />
for(j=0;j<n;j++)<br />
{<br />
cout<<"Enter element a"<<i+1<<j+1<<": ";<br />
cin>>a[i][j];<br />
}<br />
}<br />
cout<<endl<<"Displaying Matrix: "<<endl<<endl;<br />
for(i=0;i<m;i++)<br />
{<br />
for(j=0;j<n;j++)<br />
{<br />
cout<<a[i][j]<<" ";<br />
}<br />
cout<<endl<<endl;<br />
}<br />
cout<<endl<<"Displaying Matrix Transpose: "<<endl<<endl;<br />
for(i=0;i<m;i++)<br />
{<br />
for(j=0;j<n;j++)<br />
{<br />
cout<<a[j][i]<<" ";<br />
}<br />
cout<<endl<<endl;<br />
}<br />
}<br />
getch();<br />
}<br />
<br />
please try if there are mistakes please in the comments and hopefully useful ^_^<br />
<br />
<br />
<div class="g-section" id="gt-res-tools"><div class="trans-listen-button gt-icon-c" id="gt-res-listen" role="button" style="-moz-user-select: none; display: none;"><span class="gt-icon"></span><span class="gt-icon-text">Simak</span></div><div class="trans-roman-button gt-icon-c" id="gt-res-roman" role="button" style="-moz-user-select: none; display: none;"><span class="gt-icon"></span><span class="gt-icon-text">Baca secara fonetik</span></div></div></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-68095728284324712412011-06-13T20:36:00.002+07:002011-06-21T09:00:41.904+07:00Rencana Anggaran Biaya<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 12pt;"><b><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">PENGERTIAN UMUM RENCANA ANGGARAN BIAYA </span></b><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Yang dimaksud dengan rencana Anggaran biaya suatu bangunana adalah perhitungan banyaknya biaya yang diperlukan untuk bahan dan upah, setta biaya-biaya lain yang berhubungan dengan pelaksanaan Bangunan atau proyek tersebut.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 12pt; text-align: justify;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Anggaran Biaya merupakan harga dari bangunan yang dihitung dengan teliti da cermat dan memnuhi syatrat. Anggaran biaya pada bangunan yang sama akan berbeda-beda dimasing-masing daerah, disebabkan adanya perbedaan harga dan Upah tenaga Kerja</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Ada 2 macam jenis RAB adalah :</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">1.<b> RAB Kasar</b> : sebagai pedoman dalam menyusun anggaran biaya kasar digunakan harga satan tiap meter persegi luas latai.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;"><b><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">2. RAB Halus : </span></b><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Anggaran biaya bangunan atau proyek yang dihitung dengan teliti dan cermat, sesuai dengan ketentuan dan syarat-syarat penyusunan anggaran biaya. Perhitungan ini berdasarkan dan didukung oleh:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> a.Bestek :berfungsi untuk menentukan spesifikasi bahan dan syarat-syarat teknis.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> b.Gambar Bestek : berfungsi untuk menentukan besarnya masing-masing volume pekerjaan </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> c.Harga satuan Pekerjaan : didapat dari harga satuan bahan dan harga upah berdasarkan perhitungan analisa BOW.<a name='more'></a></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Mewujurkan benda, apalagi membangun sebuah rumah untuk dihuni sendiri atau berbagai investasi dimasa depan maupun property komsumsi public membutuhkan biaya yang tidak sedikit. Untuk itu diperlukan perhitungan-perhitungan yang teliti, baikjumlah biaya pembuatannya, volume pekerjaan, dan jenis pekerjaan, harga bahan, upah pekerjam maupun pemeriksaan terakhir pekerjaan (chek list). Semua ini bertujuan untuk menekan biaya pembuatan rumah sehingga lebih efesien dan terukur sesuai dengan keinginan pemilik dalam mebangun rumah, baik rumah sederhana,rumah sedang maupun rumah mewah.</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqZdx1r75qW09mFCCv8NwI0qhdyho5HlyNx_tj8DSIOIBLv2CfMSj4YCWSlYKX0ZRcf0Hsq9icNq1SB-11CIW7iDNq1Vt-uNUUY7p9naU1ZAyzzaQDzM72KWYAH3iN-UWC8keI_HH9wUE/s1600/Pamflet.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqZdx1r75qW09mFCCv8NwI0qhdyho5HlyNx_tj8DSIOIBLv2CfMSj4YCWSlYKX0ZRcf0Hsq9icNq1SB-11CIW7iDNq1Vt-uNUUY7p9naU1ZAyzzaQDzM72KWYAH3iN-UWC8keI_HH9wUE/s400/Pamflet.jpg" width="249" /> </a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://www.4shared.com/file/enK5ZVsZ/RAB.html">Download Program </a></div><div class="separator" style="clear: both; text-align: center;"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Beberapa keuntungan apabila terlebih dahulu kita menghitung biaya pembuatan rumah adalah sebagai berikut :</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> 1.Jenis pekerjaan apa saja yang akan digunakan untuk diadakan/dibeli (Apabila dikerjakan sendiri)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> 2.Volume macam-macam bahan yang dibutuhkan dalam membuat rumah dapat diketahui.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> 3.Jumlah biaya yang diperlukan untuk pembuatan rumah tersebut dapat diperkirakan sehingga perputaran keuangan dapat diatur.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> 4.Pekerjaan-pekerjaan apa saja yang sudah ataupun yang beleum selesai dikerjakan (Apabila dikerjakan pihak kedua/orang lain) dapat dikotrol.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left; text-indent: -0.25in;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> 5.Pemilik dapat terbantu dalam bernegoissi tentang harga penawaran kontraktor atau pihak kedua, sehingga tidak merugikan pemilik sebagai pihak pertama.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">.</span></div><div class="separator" style="clear: both; text-align: center;"><br />
</div></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com8tag:blogger.com,1999:blog-4721945912387687465.post-58307261627324899832011-06-12T19:43:00.000+07:002011-07-04T07:05:32.742+07:00Merge Sort<div dir="ltr" style="text-align: left;" trbidi="on"> Prinsip utama yang diimplementasikan pada algoritma merge-sort seringkali disebut sebagai pecah-belah dan taklukkan. Cara kerja algoritma merge sort adalah membagi larik data yang diberikan menjadi dua bagian yang lebih kecil. Kedua larik yang baru tersebut kemudian akan diurutkan secara terpisah. Setelah kedua buah list tersusun, maka akan dibentuk larik baru sebagai hasil penggabungan dari dua buah larik sebelumnya. Menurut keefektifannya, alogaritma ini bekerja dengan tingkat keefektifan O(nlog(n)).<br />
berikut ini adalah sourcecodenya:<br />
<br />
#include <cstdlib><br />
#include <iostream><br />
<br />
<a name='more'></a> <br />
using namespace std;<br />
class mergesort{<br />
public:<br />
void input(int[], int);<br />
void mergeSort(int[], int[], int);<br />
void m_sort(int[], int[], int, int);<br />
void merge(int[], int[], int, int, int);<br />
void output(int[], int);<br />
};<br />
<br />
void mergesort::input(int data[], int banyak){<br />
for(int i=0;i<banyak;i++){<br />
cout<<"Data ke["<<i+1<<"]: ";<br />
cin>>data[i];<br />
}<br />
}<br />
<br />
void mergesort::mergeSort(int data[], int temp[], int banyak){<br />
m_sort(data, temp, 0, banyak-1); }<br />
<br />
void mergesort::m_sort(int data[], int temp[], int kiri, int kanan){<br />
int tengah;<br />
<br />
if (kanan>kiri){<br />
tengah=(kanan+kiri)/2;<br />
m_sort(data, temp, kiri, tengah);<br />
m_sort(data, temp, (tengah+1), kanan);<br />
<br />
merge(data, temp, kiri, (tengah+1), kanan);<br />
}<br />
}<br />
<br />
void mergesort::merge(int data[], int temp[], int kiri, int tengah, <br />
<br />
int kanan){<br />
int bagiankiri, banyak, tmp_pos;<br />
<br />
bagiankiri = (tengah-1);<br />
tmp_pos = kiri;<br />
banyak = ((kanan-kiri)+1);<br />
<br />
while((kiri <= bagiankiri) && (tengah <= kanan)){<br />
if(data[kiri] <= data[tengah]){<br />
temp[tmp_pos] = data[kiri];<br />
tmp_pos = tmp_pos+1;<br />
kiri = kiri+1;<br />
}<br />
else{<br />
temp[tmp_pos] = data[tengah];<br />
tmp_pos = tmp_pos+1;<br />
tengah = tengah+1;<br />
}<br />
}<br />
//kopi bagian kiri<br />
while(kiri <= bagiankiri){<br />
temp[tmp_pos] = data[kiri];<br />
kiri = kiri+1;<br />
tmp_pos = tmp_pos+1;<br />
}<br />
<br />
while (tengah <= kanan){<br />
temp[tmp_pos] = data[tengah];<br />
tengah = tengah+1;<br />
tmp_pos = tmp_pos+1;<br />
} <br />
<br />
for(int i=0;i<banyak;i++){<br />
data[kanan] = temp[kanan];<br />
kanan = kanan-1;<br />
output(data,banyak);<br />
}<br />
}<br />
<br />
void mergesort::output(int data[], int banyak){<br />
for(int i=0;i<banyak;i++)<br />
cout<<data[i]<<" ";<br />
cout<<endl;<br />
}<br />
<br />
int main(int argc, char *argv[])<br />
{<br />
mergesort Mergesort;<br />
int banyak;<br />
cout<<"Banyak data: ";<br />
cin>>banyak;<br />
int array1[banyak];<br />
int array2[banyak];<br />
Mergesort.input(array1,banyak);<br />
cout<<"\nData awal\n";<br />
Mergesort.output(array1,banyak);<br />
cout<<"\nProses sorting dengan merge sort\n";<br />
Mergesort.mergeSort(array1, array2, banyak);<br />
cout<<"\nHasil Pengurutan : ";<br />
Mergesort.output(array1,banyak);<br />
<br />
cout<<endl;<br />
<br />
system("PAUSE");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
Silahkan di coba... ^_^</div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-44768360606298738322011-05-28T11:23:00.001+07:002011-06-21T12:17:09.323+07:00INSERTION SORT<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal"><span style="font-family: Algerian; font-size: 18pt; line-height: 115%;">Insertion Sort</span></div><div class="MsoNormal"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Algoritma insertion sort pada dasarnya memilah data yang akan diurutkan menjadi dua bagian, yang belum diurutkan (angka pertama), dan yang telah diurutkan (angka kedua). Elemen pertama yang diambil dari bagian array yang belum diurutkan dan kemudian diletakkan pada posisinya sesuai dengan bagian lain dari array yang telah diurutkan. langkah ini dilakukan secara berulang hingga tidak ada lagi elemen yang tersisa pada bagian array yang belum diurutkan, dan berikut ini adalah sourcecode dari algoritma diatas:</span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">#include <iostream.h></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">#include <conio.h></span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">int data[10],data2[10];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">int n;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">void menukar(int a, int b)</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">int t;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">t=data[b];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">data[b]=data[a];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">data[a]=t;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">void insertion_sort()</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">int temp, i,j;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">for(i=1;i<=n;i++)</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">temp=data[i];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">j=i-1;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">while(data[j]>temp&&j>=1)</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">data[j+1]=data[j];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">j--;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">data[j+1]=temp;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">void main()</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"+=============================================+"<<endl;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"+=============Program Insertion Sort==========+"<<endl;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"+=============================================+"<<endl;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"Masukkan Jumlah Data : ";</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cin>>n;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">for(int i=1; i<=n; i++)</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"Masukkan data ke "<<i<<" : ";</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cin>>data[i];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">data2[i]=data[i];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">insertion_sort();</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"\n\n";</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"Data Setelah di Sort : ";</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">for(int i=1; i<=n; i++)</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">{</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<" "<<data[i];</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">cout<<"\n\n+=============Sorting Selesai==========+"<<endl;</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">getch();</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">}</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Untuk program diatas saya membuat menggunakan <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a> seperti pada gambar di bawah ini:</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7LEJQE_IMvk-cIlxi-BIwqQbSthm0SFBuGn_6MwPU_OeRR6V5nXj8CNllH49AIoUiTpY01Xa-qPHqtR8ofgo30OdCbDYGAT-x1ZV9cd2AO9ptuZbMIfXHtb-ZTIZToC9Z1OtbeMpoIOI/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7LEJQE_IMvk-cIlxi-BIwqQbSthm0SFBuGn_6MwPU_OeRR6V5nXj8CNllH49AIoUiTpY01Xa-qPHqtR8ofgo30OdCbDYGAT-x1ZV9cd2AO9ptuZbMIfXHtb-ZTIZToC9Z1OtbeMpoIOI/s320/sourcecode.jpg" width="269" /></a></div><div class="MsoNormal"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Nah setelah temen-temen mengetik sourcecodenya silahkan di run maka hasilnya seperti gmbar di bawah ini:</span></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivMwd9pWXWvOxUYgfTtICKw30bONYqPtuN3Q2D3ci_FGdhkDjA2Esl-YEyOfVa_5v45YKMqC_6hKec7MoWhGTUp8RqS4iVmgAQcokIWn4R-9v6JyUhiDRFKOq1Qhnim1twsclRc3fkIA4/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivMwd9pWXWvOxUYgfTtICKw30bONYqPtuN3Q2D3ci_FGdhkDjA2Esl-YEyOfVa_5v45YKMqC_6hKec7MoWhGTUp8RqS4iVmgAQcokIWn4R-9v6JyUhiDRFKOq1Qhnim1twsclRc3fkIA4/s320/hasil.jpg" width="320" /></a></div><div class="MsoNormal"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;"><br />
</span> <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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Demikian program insertion sort silahkan dicoba… </span></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-78706469802860907772011-05-27T22:26:00.001+07:002011-06-21T08:52:41.586+07:00Program untuk Mencari KPK<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal"><b><span style="font-family: "Calibri","sans-serif"; font-size: 16pt; line-height: 115%;">KPK adalah kepanjangan dari Kelipatan Persekutuan Terkecil.</span></b><span style="font-size: 16pt; line-height: 115%;"><br />
</span><span style="font-size: 12pt; line-height: 115%;">Yang dimaksud kelipatan adalah kelipatan dari suatu bilangan.<br />
contoh : Kelipatan dari angka 3 adalah 3, 6, 9, 12, 15, … ( dan seterusnya.. )<br />
contoh lain : Kelipatan dari angka 4 adalah 4, 8, 12, 16, 20, … ( dan seterusnya.. )<br />
contoh lagi : Kelipatan dari angka 6 adalah 6, 12, 18, 24, 30 … ( dan seterusnya.. )</span><b><span style="font-size: 16pt; line-height: 115%;"></span></b></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Biasanya soal-soal KPK itu menggunakan dua atau lebih bilangan yang dicari.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">contoh :<br />
<b><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">Tentukan KPK dari 3 dan 4</span></b><b><br />
</b><b><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">Kelipatan 3</span></b><b> = </b>3, 6, 9, 12, 15, 18, 21, 24, 27 … ( dan seterusnya.. )<br />
<b><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">Kelipatan 4</span></b><b> = </b>4, 8, 12, 16, 20, 24, 28<b> </b>… ( dan seterusnya.. )<b><br />
</b><b><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">Lihat kelipatan yang sama angka berapa </span></b><b><span style="font-family: "Calibri","sans-serif";">??</span></b> 12 dan 24 ( dua-duanya punya kelipatan yang nilainya 12 dan 24)<br />
<b><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">Pilih yang paling kecil</span></b><b> </b>adalah 12<br />
<b><span style="font-family: "Calibri","sans-serif";">Maka, KPK dari 3 dan 4 = 12<span style="color: red;"> </span></span></b></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Naahhh….disini saya membuat program untuk menghitung KPK untuk mempermudah temen-temen untuk menghitungnya:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Berikut ini adalah sourcecodenya:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">#include <iostream.h></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">#include <conio.h></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">class hitung{</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">private:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">int a,b,nilai;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">public:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">void set_nilai(){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> nilai=0;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<"Masukkan Nilai Bil A : ";</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cin>>a;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<"Masukkan Nilai Bil B : ";</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cin>>b;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> void set_proses(){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> for(int x=1;x<=b;x++)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> nilai=nilai+a;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> if(nilai % b==0)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<"KPK Antara "<<a<<" dan "<<b<<" Adalah "<<nilai;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> break;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> } } };</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> int main(){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> int a;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> hitung b;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> b.set_nilai();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> b.set_proses();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cin>>a;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> getch();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> return 0;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">}</span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;"><br />
disini kami menggunakan <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a> untuk menjalankan program diatas, berikut hasil running sourcecode diatas:</span></div><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;"></span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;"></span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUhEylUiTeGBvnwCCC81XfZilTAQgmyybuuQcnf7I0uLpY1ujvZqlszYmv8OkAcFpQewmbs4lJ_1eUr0j9u_ZpXBOxZacHQcKfu1WdN-nxFc5ZR6DulaCSVUxDQL_vYChueXBOKMv9F9U/s1600/hasil+KPK.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUhEylUiTeGBvnwCCC81XfZilTAQgmyybuuQcnf7I0uLpY1ujvZqlszYmv8OkAcFpQewmbs4lJ_1eUr0j9u_ZpXBOxZacHQcKfu1WdN-nxFc5ZR6DulaCSVUxDQL_vYChueXBOKMv9F9U/s400/hasil+KPK.jpg" width="400" /></a></div><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;"><br />
<br />
</span></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-71767172449628340902011-05-25T09:52:00.000+07:002011-06-02T10:41:28.677+07:00Program Menghitung Pangkat<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Assalamualaikum Wr.Wb</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Temen-temen kali ini saya akan membuat program untuk menghitung perpangkatan atau untuk mempangkatkan suatu bilangan. Langkah kerja program ini adalah pertama kita memasukan bilangan yang akan di pangkatkan setelah itu kita memasukan bilangan untuk mempangkatkan bilangan tersebut contohnya jika saya memasukan angka 4 dan bilangan untuk mempangkatkannya 2 maka hasilnya adalah 4*4 yaitu 16, begitulah langkah kerja program ini temen-temen, supaya lebih jelasnya langsung saja kita coba jalankan sourcode yang sudah saya siap kan di bawah ini menggunakan <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a>:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <conio.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">class konversi{</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">private:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int x,i,n,hasil;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_hitung(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<":::::::::::::::::::::::::::::::::::::::::"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<": Program Penghitung Pangkat :"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<":::::::::::::::::::::::::::::::::::::::::"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<"Masukan Bilangan yang Akan Dipangkatkan :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin>>x;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<"Masukan Pangkatnya :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin>>n;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_proses(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">i=1; hasil=1;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">for (i=1; i<=n; i++){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">hasil=hasil*x;}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<"Hasil Pangkatnya Adalah :"<<hasil<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }};</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int main(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">konversi z;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">z.set_hitung();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">z.set_proses();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin>>y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">return 0;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">getch();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Nah temen-temen berikut ini adalah contoh sourcecode yang sudah di ketik dalam <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a>:</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB5ZIaPqJN_cqVuNnn29lvZCYJu0HAn-5Lq94dRzZw6F5R8WgbXKSM2AldwJ1_zFnxTVFjEvc86-SZdl8aCdpMbsHsGKB14B2Nb0brLt5XZ16AFmysHsH5CdiXXgJD-mKMmEt7OORk3J0/s1600/sourcode+pangkat.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB5ZIaPqJN_cqVuNnn29lvZCYJu0HAn-5Lq94dRzZw6F5R8WgbXKSM2AldwJ1_zFnxTVFjEvc86-SZdl8aCdpMbsHsGKB14B2Nb0brLt5XZ16AFmysHsH5CdiXXgJD-mKMmEt7OORk3J0/s400/sourcode+pangkat.jpg" width="400" /> </a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><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><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">mmmm…kalau temen-temen sudah mengetik sourcecodenya seperti gambar diatas temen-temen tinggal running saja maka hasil programnya adalah:</span> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYt_fHIgin_wyrGyuquTu9lFEotNyxh1pvSy2lD4GutvMVZQh0AypFbFF4qK8ZJHSP1ipIZwaLYT1oZboakqWi3f9Xi03hfFtYfb8SL1_TghaJ1TtiscOWDGyzvCXcACHRhrSuyzH8YTs/s1600/hasil+pangkat.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYt_fHIgin_wyrGyuquTu9lFEotNyxh1pvSy2lD4GutvMVZQh0AypFbFF4qK8ZJHSP1ipIZwaLYT1oZboakqWi3f9Xi03hfFtYfb8SL1_TghaJ1TtiscOWDGyzvCXcACHRhrSuyzH8YTs/s400/hasil+pangkat.jpg" width="400" /> </a></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Demikian temen-temen program untuk menghitung pangkat, semoga bermanfaat bagi temen-temen dan bila ada kekurangan mohon komentarnya….. ^_^</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-48984895505243036022011-05-21T07:15:00.000+07:002011-07-04T09:38:29.105+07:00Kombinasi<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal"><b><span style="font-family: "Cracked Johnnie"; font-size: 12pt; line-height: 115%;">Kombinasi</span></b></div><div class="MsoNormal"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Kombinasi adalah menggabungkan beberapa objek dari suatu grup tanpa memperhatikan urutan. Sebagai contoh suatu himpunan {1,2,3} adalah sama dengan himpunan {2,3,1} dan {3,1,2}.</span></div><div class="MsoNormal"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Contoh: Seorang anak hanya diperbolehkan mengambil dua buah amplop dari tiga buah amplop yang disediakan yaitu amplop A, amplop B dan amplop C. Tentukan ada berapa banyak kombinasi untuk mengambil dua buah amplop dari tiga buah amplop yang disediakan?</span></div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;"><a name='more'></a>Jawaban: Ada 3 kombinasi yaitu:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">1. AB atau BA, karena pengambilan amplop A dan B sama dengan pengambilan B dan A.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">2. AC atau CA.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">3. BC atau CB.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">Salah satu aplikasi kombinasi digunakan untuk mencari peluang suatu kejadian atau menghitung kombinasi kejadian tertentu. Kombinasi dari n dan r kita bisa notasikan nCr, dirumuskan dengan:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">nCr = n faktorial/(r factorial * (n-r) faktorial)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">dimana n faktorial = n! = 1 * 2 * 3 * … * n.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">berikut ini adalah sourcecodenya:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">#include <iostream.h></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">#include <conio.h></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> int faktorial (int n)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> int fak;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> if (n<=1)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> fak=1;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> else</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> fak=n*faktorial(n-1);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> return (fak);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> int main()</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> int n,r, kombinasi;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cout<<"******************************"<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cout<<"*Program Menghitung Kombinasi*"<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cout<<"******************************"<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cout<<" \n Masukkan Nilai n : ";</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cin>>n;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cout<<" \n Masukkan Nilai r : ";</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cin>>r;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> kombinasi=faktorial(n)/(faktorial(r)*faktorial(n-r));</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> cout<<" \n Kombinasinya adalah: "<<kombinasi;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> getch ();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> return 0;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">}</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">demikian program untuk mencari kombinasi silahkan di coba ^_^ </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">bila ada yang kurang mohon di komentar...makasih... ^_^ </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-55861021855839413132011-05-16T17:16:00.003+07:002011-06-26T22:23:54.816+07:00Bubble Sort<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal"><b><span style="font-size: 12pt; line-height: 115%;">Bubble Sort</span></b></div><div class="MsoNormal">Teknik pengurutan/sorting selain Selection Sort yaitu: Bubble Sort. Bubble Sort juga salah satu algoritma pengurutan yang mudah untuk dipelajari.</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Konsep dasarnya yaitu : “Melakukan pembandingan antara ’data[n] dengan data[n+1]’ atau antara ’data[n] dengan data[n-1]’ kemudian jika lebih kecil/besar dilakukan pertukaran. Pada setiap iterasi dapat terjadi beberapa kali pertukaran atau tidak sama sekali. Jumlah iterasi ditentukan oleh banyaknya data atau ‘N’. Iterasi=N-1.”</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;">Dibawah ini adalah sourcode bubble sort:</div><div class="MsoNormal" style="margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <conio.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void main()</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">{</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> int array[100],n,i,j,temp;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> clrscr();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"silahkan masukan jumlah variable yang akan di sorting :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>n;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"masukan "<<n<<" angka\n";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> for(i=0;i<n;i++)</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>array[i];</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> for(i=0;i<n;i++)</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> for(j=0;j<n-1;j++)</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> if(array[j]>array[j+1])</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> temp=array[j];</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> array[j]=array[j+1];</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> array[j+1]=temp;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"\nHasil array diurutkan dalam urutan menaik.\n";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> for(i=0;i<n;i++)</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<array[i]<<" ";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> getch();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Berikut ini adalah gambar dari hasil bubble sort:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiouzW40jA5rNj6CvTgbSfytN3Rv8b1afzHSQkHA4BRhT9_Q9a3C_LX32W1GSHtRp_CLwRrqRaiQxmxXa1Os3YPIjIftZ75n_iItsQ2eMDV4H2ynoDImafAHjw2JAjzmtIjaB82F10asvo/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiouzW40jA5rNj6CvTgbSfytN3Rv8b1afzHSQkHA4BRhT9_Q9a3C_LX32W1GSHtRp_CLwRrqRaiQxmxXa1Os3YPIjIftZ75n_iItsQ2eMDV4H2ynoDImafAHjw2JAjzmtIjaB82F10asvo/s400/hasil.jpg" width="400" /></a></div><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;"> demikian program sorting menggunakan bubble sort ^_^<br />
bila ada kesalahan mohon di koment...</span></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-54680249818039617532011-05-15T22:24:00.004+07:002011-05-28T23:16:36.363+07:00Program Pencari Bilangan Ganjil<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Assalamualaikum semuanya….<br />
nah temen-temen kali ini saya akan mendeskripsikan suatu program yaitu program untuk mencari suatu bilangan yang bernilai ganjil, bilangan ganjil itu adalah bilangan yang tidak habis dibagi 2 jadi mudah saja algoritma dari program ini adalah jika kita memasukan berapa jumlah yang mau kita seleksi bilangan ganjil nya maka jumlah dari bilngan itu akan di bagi 2 dan nilai ganjilnya adalah semua bilngan yang tidak habis di bagi 2 disini menggunakan mod 2, untuk lebih jelasnya langsung saja kita coba sourcecode yang sudah saya siapkan di bawah ini menggunakan <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a>.</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Berikut adalah sourcecodenya:</span><br />
<span style="font-size: 12pt;"> </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">#include <iostream.h></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">#include <conio.h></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> class deret {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> private:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> int batas, i;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> public:</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> void set_deret(){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<" ==============================="<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<"||Program Pencari Bilangan Ganjil||"<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<" ==============================="<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<"Tentukan jumlah bilngan yang mau diseleksi: ";</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cin>>batas;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> void set_hasil(){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<"yang termasuk bilangan ganjil sampai angka "<<batas<<" adalah: "<<endl<<endl;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> for(int i=0;i<=batas;i++){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> if(i%2!=0){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> cout<<i<<" ";</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> }}</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> };</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> int main(){</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> deret b;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> b.set_deret();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> b.set_hasil();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> getch();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> return 0;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">}</span></div><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;">Nah temen-temen setelah sourcecode di atas di tulis di dalam Borland C++ maka akan tampil seperti pada gambar di bawah ini:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwuaxKU5ObI2NBUP1vdhQQhR2d-Aiil6t6f3rbMSUgPVayh7NjDTiOf_SqI5IpOFJ85Jx-Q1klsqL_d0mlyhEpXWZ0oUbG2bv7idAm2wX3k-ZQNvVZfj2z9TW5LM_uqZaKmYjwfURfcJA/s1600/sourcecode+bil.+ganjill.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwuaxKU5ObI2NBUP1vdhQQhR2d-Aiil6t6f3rbMSUgPVayh7NjDTiOf_SqI5IpOFJ85Jx-Q1klsqL_d0mlyhEpXWZ0oUbG2bv7idAm2wX3k-ZQNvVZfj2z9TW5LM_uqZaKmYjwfURfcJA/s400/sourcecode+bil.+ganjill.jpg" width="400" /></a></div><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 115%;"> </span> <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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Dan setelah selesai menulisnya temen-temen bisa langsung mengcompilenya dengan memilih atau klik ctrl+F9….lihat seperti gambar di bawah ini:</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Vj2j11hDcRPpLlLbci7Y4njsFMjaHcFbVa-JavpNnROpXmluMlZ7qE51Og8sCyanp5O6WVGAiw9N4dTi_HvtL4RB4edCQ9CKrkkkXZIb5BjJRigJPQQJ4F6i8JSoj8Cs1SrzplAb4ik/s1600/hasil+bil.gnjil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Vj2j11hDcRPpLlLbci7Y4njsFMjaHcFbVa-JavpNnROpXmluMlZ7qE51Og8sCyanp5O6WVGAiw9N4dTi_HvtL4RB4edCQ9CKrkkkXZIb5BjJRigJPQQJ4F6i8JSoj8Cs1SrzplAb4ik/s400/hasil+bil.gnjil.jpg" width="400" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;"> </span> <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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-size: 12pt;">Ini hasilnya temen-temen…disini saya mencoba memasukan 50 maka hasil yang akan keluar adalah 1, 3, 5, 7, 9, 11…dan seterusnya…<br />
demikian lah Program Pencari Bilangan Ganjil ini….</span><br />
<span style="font-size: 12pt;">Semoga bermanfaat bagi temen-temen semua…,</span><br />
<span style="font-size: 12pt;"> Bila ada kesalahan atau kekurangannya mohon d komentar ya… Terima Kasih... ^_^ <br />
</span></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-7481053785259758872011-05-14T16:48:00.002+07:002011-05-19T21:27:13.443+07:00Menghitung Panjang Sisi Miring Pada Segitiga Siku-Siku<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Nah pada kesempatan kali ini saya akan mencoba membuat program <b>Mencari panjang sisi miring pada segitiga siku-siku, </b>sebelumnya saya yakin bahwa pasti rekan-rekan semua bisa menghitung panjang sisi miring pada segitiga siku-siku secara manual yaitu dengan rumus <b>“ </b><b>c = akar dari a<sup>2</sup> + b<sup>2 </sup>“ </b>nah disini saya akan membuat programnya menggunakan <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a>. Untuk membuat program tersebut mengunakan sqrt() yang menggunakan akar kuadrat. Fungsi sqrt tersebut terdapat di library #include <math.h>, di dalam pergrom ini kita tinggal menginputkan 2 inputan saja. Untuk lebih jelasnya langsung saja kita lihat sourcecode di bawah ini:<br />
<br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <conio.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <math.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">class konversi {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">private:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> float a,b,c;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> void set_konversi(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Mencari Panjang Miring Sisi Segitiga "<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Masukkan Panjang Sisi A : ";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>a;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Masukkan Panjang Sisi B : ";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>b;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_hasil(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> c= a*a + b*b;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Jadi panjang sisi miring tersebut adalah : "<<sqrt(c)<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }};</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> int main() {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> int a;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> konversi y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> y.set_konversi();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> y.set_hasil();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>a;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> getch();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Setelah sourcecode diatas di ketik pada borland C++ maka akan tampil seperti pada gambar di bawah ini:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY5rjrmRgfOcHzDWXbGfeGsxAVWAj2bRy1Q31o0etjuTAUBqKbOt5T-ROEJ878x8ZPcgzyapiVp_vmM1-bRaOyf44PIkGeUa75PDhT69J22VIW-B0svOmrzX7EfAtQM1IJd1kt1goBom8/s1600/sourcecode+sisi+miring.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY5rjrmRgfOcHzDWXbGfeGsxAVWAj2bRy1Q31o0etjuTAUBqKbOt5T-ROEJ878x8ZPcgzyapiVp_vmM1-bRaOyf44PIkGeUa75PDhT69J22VIW-B0svOmrzX7EfAtQM1IJd1kt1goBom8/s320/sourcecode+sisi+miring.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Setelah ini klik lah pada tool run…atau klik ctrl + F9 maka program di atas akan running seperti pada gambar di bawah ini:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8qVh1GKlQlYqmlUIknnFP4LgJdu6I89dV60rOR0OTn6POeMrFfMcIVKcPnjVmHHj940ORjyb9u83CcwSDZcFvTzK4XK9YybMgLZT1AFUVoctfITb6tv_UPUG9jp5VnCoMq2utvURjQkw/s1600/hasil+sisi+miring.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="98" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8qVh1GKlQlYqmlUIknnFP4LgJdu6I89dV60rOR0OTn6POeMrFfMcIVKcPnjVmHHj940ORjyb9u83CcwSDZcFvTzK4XK9YybMgLZT1AFUVoctfITb6tv_UPUG9jp5VnCoMq2utvURjQkw/s320/hasil+sisi+miring.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> <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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Pada gambar diatas saya mencoba memasukan pada panjang sisi A yaitu 15, dan pada panjang sisi B yaitu 20, nah… utuk menghitungnya menggunakan rumus seperti di atas yaitu <b>“</b> <b>c = akar dari a<sup>2</sup> + b<sup>2 </sup>“ </b>maka hasilnya adalah 25.<br />
<br />
demikian program untuk menghitung panjang sisi miring segitiga semoga bermanfaat.</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><b><sup> </sup></b></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-66292761478759417712011-05-14T08:07:00.002+07:002011-05-19T21:43:43.913+07:00Program untuk Mencari FPB<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Pada kesempatan kali ini saya akan membuat program yaitu program untuk mencari FPB “Faktor Persekutuan Terbesar” untuk program ini saya membuat menggunakan <a href="http://www.4shared.com/file/Q7MAmTzk/devcpp-4992_setup.html">DEV C++</a>, algoritma dari program ini adalah <br />
<br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">input : Nilai pertama (m)</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> Nilai kedua(n)</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Proses : r = m%n</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Output : hasil FPB dari nilai pertama dan nilai kedua</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> </div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Berikut adalah sourcecodenya silahkan di coba:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><a name='more'></a><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <conio.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">class hitung{</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">private:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int m,n,r;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_hitung(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<"=================="<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<"||Menghitung FPB||"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout<<"=================="<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout << "Masukkan nilai pertama : ";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin >> m;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout << "Masukan nilai kedua : " ;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin >> n;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">r = m%n;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_hasil(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">m = n;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">n = r;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">r = m%n;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cout << "FPB dari nilai pertama dan nilai kedua adalah : " <<n<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}};</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int main(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">hitung z;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">z.set_hitung();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">z.set_hasil();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin>>y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">getch();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Setelah semua di ketik pada Borland C++ maka akan terlihat tampilan sebagai berikut:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI2mg1S2W4sYSPbJwlAFQYakIz0m1jLHFn9SWGVkFsyR4zM65eGMthHOPqV9TQDY2DE2Ne2jAU1gqoRvLJtdxC9Dk2QPws7e1Y-f1_y7KlJIXpobBkt7RIXl-o6v-NytDjBf7B6b7CQDU/s1600/sourcecode+FPB+pake+DEV+C%252B%252B.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI2mg1S2W4sYSPbJwlAFQYakIz0m1jLHFn9SWGVkFsyR4zM65eGMthHOPqV9TQDY2DE2Ne2jAU1gqoRvLJtdxC9Dk2QPws7e1Y-f1_y7KlJIXpobBkt7RIXl-o6v-NytDjBf7B6b7CQDU/s320/sourcecode+FPB+pake+DEV+C%252B%252B.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Nah setelah semua sourcecodenya diketik seperti pada gambar diatas maka klik lah run atau ctrl+F9…maka tampilan yang muncul akan seperti pada gambar di bawah ini, disini saya mencoba menghitung inputan pertama yaitu 252 dan inputan kedua yaitu 5…maka hasil FPB dari 252 dan 5 adalah 2, langsung saja kita lihat gambar di bawah ini:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirq0Su3sED-QV3XFw_WC9fY5Hjyh7vsiZX4IBumrxCJa5JZRI-Oe-wOmTvxKU9zjbSTg6XTQjzxaOR_0pmYarqbLBgU2TCcCgvUNZECBoT27Lxg6i4fTxNO0hqYZTbXmiwKeQ8XL64byk/s1600/hasil+FPB+pake+DEV+C%252B%252B.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="92" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirq0Su3sED-QV3XFw_WC9fY5Hjyh7vsiZX4IBumrxCJa5JZRI-Oe-wOmTvxKU9zjbSTg6XTQjzxaOR_0pmYarqbLBgU2TCcCgvUNZECBoT27Lxg6i4fTxNO0hqYZTbXmiwKeQ8XL64byk/s320/hasil+FPB+pake+DEV+C%252B%252B.jpg" width="320" /> <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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Demikian program untuk menghitung FPBnya semoga bermanfaat dan jika ada kekurangan atau pun kesalahan mohon d komentar….terimakasih…..</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirq0Su3sED-QV3XFw_WC9fY5Hjyh7vsiZX4IBumrxCJa5JZRI-Oe-wOmTvxKU9zjbSTg6XTQjzxaOR_0pmYarqbLBgU2TCcCgvUNZECBoT27Lxg6i4fTxNO0hqYZTbXmiwKeQ8XL64byk/s1600/hasil+FPB+pake+DEV+C%252B%252B.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirq0Su3sED-QV3XFw_WC9fY5Hjyh7vsiZX4IBumrxCJa5JZRI-Oe-wOmTvxKU9zjbSTg6XTQjzxaOR_0pmYarqbLBgU2TCcCgvUNZECBoT27Lxg6i4fTxNO0hqYZTbXmiwKeQ8XL64byk/s1600/hasil+FPB+pake+DEV+C%252B%252B.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br />
</a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-92226108394401611712011-04-16T19:28:00.001+07:002011-04-22T10:07:43.486+07:00Program untuk Menghitung Volume Limas Segitiga<div dir="ltr" style="text-align: left;" trbidi="on"><div class="MsoNormal">Nah sekarang saya mencoba membuat program yang insyaallah dapat mempermudah temen-temen semua untuk menghitung volume limas segi empat, langkah kerja program ini adalah kita masukan panjang limas, lebar limas, tinggi limas setelah itu program akan memproses menggunakan rumus 1/3*p*l*t setelah itu maka outputnya akan keluar hasil dari penghitungan diatas, nah..untuk lebih jelasnya langsung saja kita ikuti langkah program berikut ini.<br />
di bawah ini adalah sourcecodenya:</div><div class="MsoNormal"></div><a name='more'></a><br />
<div class="MsoNormal">#include <iostream.h></div><div class="MsoNormal">#include <conio.h></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">class volume {</div><div class="MsoNormal">private:</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">double limas, p, l, t;</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">public:</div><div class="MsoNormal">void set_volume(){</div><div class="MsoNormal">cout<<"Menghitung Volume Limas Segi Empat"<<endl<<endl;</div><div class="MsoNormal">cout<<"V=1/3*p*l*t"<<endl;</div><div class="MsoNormal">cout<<"masukan panjang limas:";</div><div class="MsoNormal">cin>>p;</div><div class="MsoNormal">cout<<"masukan lebar limas:";</div><div class="MsoNormal">cin>>l;</div><div class="MsoNormal">cout<<"masukan tinggi limas:";</div><div class="MsoNormal">cin>>t;</div><div class="MsoNormal">}</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">void set_hasil(){</div><div class="MsoNormal">limas=(p*l*t)/3;</div><div class="MsoNormal">cout<<"Maka Volume Limas Segi Empatnya adalah:"<<limas<<endl;</div><div class="MsoNormal">}</div><div class="MsoNormal">};</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">int main(){</div><div class="MsoNormal">int a;</div><div class="MsoNormal">volume b;</div><div class="MsoNormal">b.set_volume();</div><div class="MsoNormal">b.set_hasil();</div><div class="MsoNormal">cin>>a;</div><div class="MsoNormal">getch();</div><div class="MsoNormal">return 0;</div><div class="MsoNormal">}</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"></div><div class="MsoNormal">Setelah ditulis sourcecode di atas pada Borland C++ maka akan tampil seperti pada gambar di bawah ini:</div><div class="MsoNormal"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNCyl_PjRM42evsEe0-1K2gMVp5TCPM7et2xHaVCbpYloNLf2gxUSEaAPfGBJguHWlFWvVb91hCjyV_jwz3zpDASJtWQvOBg1kt6TYS5ksyKG7L1WD9IvPDaA94dy6t1RqA7jRR9cgcHw/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNCyl_PjRM42evsEe0-1K2gMVp5TCPM7et2xHaVCbpYloNLf2gxUSEaAPfGBJguHWlFWvVb91hCjyV_jwz3zpDASJtWQvOBg1kt6TYS5ksyKG7L1WD9IvPDaA94dy6t1RqA7jRR9cgcHw/s320/sourcecode.jpg" width="320" /> </a></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: "Times New Roman"; font-size: 12pt;">Dan tekan tombol ctrl F9 atau klik Run maka hasilnya akan tampil pada layar sebagai berikut:</span> </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGL4vWbWDeVBA0OgW5_J6Czkg6Exc8d06Wz2OVh7ZnqyJBB26QQjE2xMEjBvoB0KGJMKZIvI1IQHVhC1ypUt3WTNiWvOhJBWUoG3EPmfBRLm2GpUhVxi2C_DWRLHKIfj9mx90cA3RzE24/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGL4vWbWDeVBA0OgW5_J6Czkg6Exc8d06Wz2OVh7ZnqyJBB26QQjE2xMEjBvoB0KGJMKZIvI1IQHVhC1ypUt3WTNiWvOhJBWUoG3EPmfBRLm2GpUhVxi2C_DWRLHKIfj9mx90cA3RzE24/s320/hasil.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="MsoNormal"></div><div class="MsoNormal">Dari program diatas saya mencoba memasukan panjang limas:5, lebar limas:4, dan tinggi limas:6, maka outputnya adalah 40, demikianlah program yang cukup sederhana tapi insyaallah tetep bermanfaat…hehe<br />
bila ada kesalahan mohon dikomentar ya..</div><div class="MsoNormal"><br />
</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-84628334078857748302011-04-16T09:49:00.002+07:002011-04-22T10:18:43.171+07:00Program Menghitung Diskon pada suatu Belanjaan<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal">Pada kesempatan ini saya membuat program untuk menghitung diskon belanjaan, langkah kerjanya yaitu pertama inputkan harga barang dan diskon yang di dapat setelah itu jumlah yang harus di bayar akan keluar sebagai outputnya…untuk lebih jelasnya langsung saja kita ikut langkah di bawah ini:<br />
berikut ini adalah sourcecodenya:</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">#include <iostream.h></div><div class="MsoNormal">#include <conio.h></div><div class="MsoNormal"><br />
<a name='more'></a><br />
</div><div class="MsoNormal">class diskon {</div><div class="MsoNormal">private:</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">double diskon, p, h;</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">public:</div><div class="MsoNormal">void set_diskon(){</div><div class="MsoNormal">cout<<"Menghitung Besar Diskon Belanjaan"<<endl<<endl;</div><div class="MsoNormal">cout<<"Masukan harga barang:";</div><div class="MsoNormal">cin>>h;</div><div class="MsoNormal">cout<<"Masukan diskon:";</div><div class="MsoNormal">cin>>p;</div><div class="MsoNormal">}</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">void set_hasil(){</div><div class="MsoNormal">diskon=(p*h)/100;</div><div class="MsoNormal">cout<<"Maka jumlah belanjaan yang harus anda bayar adalah:"<<diskon<<"rupiah"<<endl;</div><div class="MsoNormal"><span lang="FR">}</span></div><div class="MsoNormal"><span lang="FR">};</span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span lang="FR">int main(){</span></div><div class="MsoNormal"><span lang="FR">int p;</span></div><div class="MsoNormal"><span lang="FR">diskon h;</span></div><div class="MsoNormal">h.set_diskon();</div><div class="MsoNormal">h.set_hasil();</div><div class="MsoNormal">cin>>p;</div><div class="MsoNormal">getch();</div><div class="MsoNormal">return 0;</div><div class="MsoNormal">}</div><div class="MsoNormal"><br />
</div><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Setelah ditulis sourcecode di atas pada Borland C++ maka akan tampil seperti pada gambar di bawah ini:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHPSEBdkasT0pV7JnGOC44QjSpTXhMZbSNBqKdm_3efa9fmYcKlEd-Mby8kxxesjbue9EPLTeCCTDh3uk4M72BjToaEt5lOqcU3ls-GCExlGx4sLmPMZId3szb2ppoMV3aBy1BMYtsE_0/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHPSEBdkasT0pV7JnGOC44QjSpTXhMZbSNBqKdm_3efa9fmYcKlEd-Mby8kxxesjbue9EPLTeCCTDh3uk4M72BjToaEt5lOqcU3ls-GCExlGx4sLmPMZId3szb2ppoMV3aBy1BMYtsE_0/s320/sourcecode.jpg" width="320" /></a></div><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> </span> <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><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Dan tekan tombol ctrl F9 atau klik Run maka hasilnya akan tampil pada layar sebagai berikut:</span></m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8psiyo52aGUk4zh_pwGo8cDNgEGFrRR6Mi5LW8KLjajudQJ7Rm1XFDzAQXEsY9R2aTx_kqMF_mt9u_B-npzIuPvPDsCTEimwYet9kP7eKQezOYnBvfyco_A_r3_REwpxOmzAoHC4gWI/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8psiyo52aGUk4zh_pwGo8cDNgEGFrRR6Mi5LW8KLjajudQJ7Rm1XFDzAQXEsY9R2aTx_kqMF_mt9u_B-npzIuPvPDsCTEimwYet9kP7eKQezOYnBvfyco_A_r3_REwpxOmzAoHC4gWI/s320/hasil.jpg" width="320" /></a></div><div class="MsoNormal">Dari program diatas saya mencoba memasukan harga barangnya adalah 10000 dan diskonnya 50% maka jumlah belanjaan yang harus di bayar adalah 5000 rupiah.</div><div class="MsoNormal">Demikian langkah kerja program untuk menghitung diskon suatu belanjaan, semoga bermanfaat dan bila ada kekurangan atau kesalahan mohon komentarnya….terimakasih… </div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-38720163293203243612011-04-16T09:24:00.003+07:002011-04-22T09:48:37.927+07:00Program untuk Menghitung Keliling Lingkaran<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal">Pada kesempatan kali ini saya akan mencoba mendemokan suatu program yaitu program untuk menghitung keliling suatu lingkaran, langkah kerjanya cukup sederhana yaitu sebagai berikut:</div><div class="MsoNormal">Untuk pendeklarasian phi sudah di tentukan yaitu 3,14 tinggal menginputkan diameternya, dengan rumus (phi*d) untuk lebih jelasnya langsung saja kita coba runing program di bawah ini.<br />
berikut adalah sourcecodenya: </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">#include <iostream.h></div><div class="MsoNormal">#include <conio.h></div><div class="MsoNormal">#define PHI=3,14</div><div class="MsoNormal"><br />
<a name='more'></a><br />
</div><div class="MsoNormal">class menghitung {</div><div class="MsoNormal">private:</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">double keliling, d;</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">public:</div><div class="MsoNormal">void set_menghitung(){</div><div class="MsoNormal">cout<<”Menghitung Keliling Lingkaran”<<endl<<endl;</div><div class="MsoNormal">cout<<"PHI=3,14"<<endl;</div><div class="MsoNormal">cout<<"masukan diameter lingkaran:";</div><div class="MsoNormal">cin>>d;</div><div class="MsoNormal">}</div><div class="MsoNormal">void set_hasil(){</div><div class="MsoNormal">keliling=(3.14*d);</div><div class="MsoNormal">cout<<"maka keliling lingkarannya adalah:"<<keliling<<endl;</div><div class="MsoNormal"><span lang="FR">}</span></div><div class="MsoNormal"><span lang="FR">};</span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span lang="FR">int main(){</span></div><div class="MsoNormal"><span lang="FR">int x;</span></div><div class="MsoNormal"><span lang="FR">menghitung y;</span></div><div class="MsoNormal">y.set_menghitung();</div><div class="MsoNormal">y.set_hasil();</div><div class="MsoNormal">cin>>x;</div><div class="MsoNormal">getch();</div><div class="MsoNormal">return 0;</div><div class="MsoNormal">}</div><div class="MsoNormal"><br />
</div><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Setelah diketik pada Borland C++ akan tampak seperti pada gambar berikut ini:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL0jhCK0mftUDQ1s7wFJHGeCdPklzifIl4FJeFiD2V_0E0LwYoo_QSMe7pNn8tQfGlOSlteiYIkTkuENQGhSq20LqF77d5MvUZQ_6v94NJV0ir4185mU-sjpqkKKtVM5YUhYDOirsPIeY/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL0jhCK0mftUDQ1s7wFJHGeCdPklzifIl4FJeFiD2V_0E0LwYoo_QSMe7pNn8tQfGlOSlteiYIkTkuENQGhSq20LqF77d5MvUZQ_6v94NJV0ir4185mU-sjpqkKKtVM5YUhYDOirsPIeY/s320/sourcecode.jpg" width="320" /></a></div><span style="font-family: "Times New Roman","serif"; font-size: 12pt;"> </span> <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><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">Setelah program diatas ditulis maka tekan tombol ctrl F9 atau klik Run maka hasilnya akan tampil pada layar sebagai berikut:</span></m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXx7AGK-xtxXHctXV71GnVLl50uTH837pH25g2nZceZ1ArPT5Sv2TlkavIXWNT9kq9f2pyjEXVjuBc5To1h_CPnvMXwlYhvBNClcJxFKGSRXSFkSwomH_ig1AR8ZT45zCtczZdl2TYvt0/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXx7AGK-xtxXHctXV71GnVLl50uTH837pH25g2nZceZ1ArPT5Sv2TlkavIXWNT9kq9f2pyjEXVjuBc5To1h_CPnvMXwlYhvBNClcJxFKGSRXSFkSwomH_ig1AR8ZT45zCtczZdl2TYvt0/s320/hasil.jpg" width="320" /></a></div><div class="MsoNormal">Dari program diatas saya memasukkan diameternya 10 cm maka kelilingnya 31.4 cm.<br />
demikian program sederhana yang bisa saya buat, jika ada kekurangan mohon dikoment ya….</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-11655692623817794692011-04-06T22:42:00.006+07:002011-04-22T09:03:40.142+07:00Program Sedehana untuk Menghitung Dana Bantuan<div dir="ltr" style="text-align: left;" trbidi="on"><ul style="text-align: left;"></ul><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: 0.5in;">Kali ini saya akan membuat program untuk menghitung banyaknya pengeluaran dana dari pemerintah untuk warga korban bencana letusan gunung merapi.Korban bencana gunung merapi yang terjadi di yogyakarta diberi bantuan oleh pemerintah berdasarkan jumlah dan usia anggota jiwa dalam keluarganya selama sebulan. Jika di bawah usia balita, biaya per jiwa adalah Rp 7.000,00/hari, dan diatas balita biayanya adalah Rp12.000,00/hari. Algoritma yang membaca jumlah biaya yang harus dikeluarkan oleh pemerintah untuk satu keluarga yang terdiri dari 5 jiwa dalam sebulan !</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Berikut ini adalah contoh programnya:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;">#include <conio.h></div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> class Bantuan {</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> private:</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> double biaya, jumlah_usia_balita, jumlah_usia_dewasa;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> public:</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> void set_Bantuan(){</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> cout<<"masukan jumlah semua jiwa balita :";</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> cin>>jumlah_usia_balita;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> cout<<"\n memasukan semua jumlah jiwa dewasa :";</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> cin>>jumlah_usia_dewasa;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> void set_hasil(){</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> biaya=((jumlah_usia_balita*7.000)+(jumlah_usia_dewasa*12.000))*30;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> cout<<"\n maka biaya yang dikeluarkan pemerintah dalam sebulan adalah Rp." <<biaya<<".000"<<endl;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> };</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> int main(){</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> int x;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> Bantuan B;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> B.set_Bantuan();</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> B.set_hasil();</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> cin>>x;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;"> return 0;</div><div class="MsoNormal" style="color: #741b47; line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Ketiklah pada Borland C++ serperti pada gambar berikut ini:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS04cKpL0diapcqEnxatYD7DrmrrU3QLvSVMYz__VLy4jPDkJCcEsjes4lMc0i-2VwNZqOLkpxitnZbmrTOOg5eRLCCUEUODKUvMO9WeSmBEgwp4Z-wI5m7RAXuXeWsysIl3MKy6bnGrg/s1600/Graphic1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS04cKpL0diapcqEnxatYD7DrmrrU3QLvSVMYz__VLy4jPDkJCcEsjes4lMc0i-2VwNZqOLkpxitnZbmrTOOg5eRLCCUEUODKUvMO9WeSmBEgwp4Z-wI5m7RAXuXeWsysIl3MKy6bnGrg/s320/Graphic1.jpg" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal" style="line-height: 150%; text-align: justify;">Setelah selesai selanjutnya tekan tombol ctrl F9 atau klik Run maka hasilnya akan tampil pada layar sebagai berikut:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSk4H-Aby9tmM_XrNLFGWD8UHb-7O2dJYamwKdW7iaK9QiewEXAKY7uKU5uwgXLmAGDjNkCsUCf-ETXeHfSpa4ZU8vyaR7LpnXVsPM1XkVSNcHedDz-YxZzPnzWHOsqlkAQTKKCRmQGyM/s1600/hasil.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSk4H-Aby9tmM_XrNLFGWD8UHb-7O2dJYamwKdW7iaK9QiewEXAKY7uKU5uwgXLmAGDjNkCsUCf-ETXeHfSpa4ZU8vyaR7LpnXVsPM1XkVSNcHedDz-YxZzPnzWHOsqlkAQTKKCRmQGyM/s320/hasil.JPG" width="320" /></a></div></div><div class="separator" style="clear: both; text-align: center;"></div></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Dari gambar di atas saya mencoba memasukan dalam inputan semua jiwa balita yaitu 3, jumlah jiwa dewasa yaitu 2 maka hasil pengeluaran perbulan oleh pemerintah dalam satu keluarga itu adalah Rp.1.350.000</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-24994130384730492232011-04-06T08:46:00.001+07:002011-04-22T08:58:49.460+07:00Program untuk Konversi KeDetik<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Nah kali ini saya akan menampilkan sebuah contoh program untuk merubah waktu dari jam dan menit ke detik untuk lebih jelasnya langsung saja kita ikuti urutan pembuatan program berikut ini:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Di bawah ini adalah sourcecodenya, silahkan di coba:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <conio.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">class konversi {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">private:<br />
<a name='more'></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">float j,m,s,jam,menit,hasil;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_konversi(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"<======================================>";cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"<Konversi Dari Jam,menit,Detik Ke Detik>";cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"<======================================>";cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Masukan Jam : " ;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>j ; cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Masukan Menit: " ;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>m ; cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Masukan Detik: " ;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>s ; cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">void set_hasil(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> jam=j*3600;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> menit=m*60;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> hasil=jam+menit+s;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"Hasilnya : " ;cout<<hasil; cout<<" Detik";cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"<======================================>";cout<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }};</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int main(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int Y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">konversi k;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">k.set_konversi();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">k.set_hasil();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">cin>>Y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">return 0;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Setelah source code diatas di ketik pada Borland maka akan tampil seperti pada gambar berikut:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig8pFI1h75ChlRQPFFIo5MaIlIhyphenhyphenyJ_O6VG1eTEC8V9W9mdgnzqkhg93EM-aLCueA31B2wIsPnCPOuhQLmcsiNw94wY6LtbPSPdig6irS7mpmPl6M3ICRkm5JInJQGAuXPB3UrYYZZrNE/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig8pFI1h75ChlRQPFFIo5MaIlIhyphenhyphenyJ_O6VG1eTEC8V9W9mdgnzqkhg93EM-aLCueA31B2wIsPnCPOuhQLmcsiNw94wY6LtbPSPdig6irS7mpmPl6M3ICRkm5JInJQGAuXPB3UrYYZZrNE/s320/sourcecode.jpg" width="306" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> <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><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Setelah itu selanjutnya tekan tombol ctrl F9 atau klik Run maka hasilnya akan tampil pada layar sebagai berikut:</span></m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7_MyZLXRWFRCr8CLRXYEFx1KRwPiI5ESwgrh-2tbAocXBphJjSHkmiuz-nZNonOBIbQ2OZkwWcdac5EiEnF9EE71tKM62fWKAiGcR8r9wMk7bN3U8qX4j3GCBP4CWDcHOSyG5fOScUNg/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7_MyZLXRWFRCr8CLRXYEFx1KRwPiI5ESwgrh-2tbAocXBphJjSHkmiuz-nZNonOBIbQ2OZkwWcdac5EiEnF9EE71tKM62fWKAiGcR8r9wMk7bN3U8qX4j3GCBP4CWDcHOSyG5fOScUNg/s320/hasil.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: 150%; text-align: justify;">Hasilnya seperti pada gambar diatas, saya memasukan 3jam, 4menit, 10detik dan hasilnya adalah 11050 detik.</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-42671224636391179652011-04-06T08:01:00.003+07:002011-05-19T22:10:50.938+07:00Program untuk Menghitung Berat Badan Ideal<div dir="ltr" style="text-align: left;" trbidi="on"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;">Nah yang satu ini saya membuat program yang cukup unik tapi menarik...yaitu program untuk menghitung berat badan ideal</span><span style="font-family: "Times New Roman","serif"; font-size: 12pt;">...<span style="color: black;">bagi temen-temen semua yang masih penasaran dengan berat badannya apakah ideal atau belum ideal saya sarankan untuk mencoba menghitungnya, disini saya mencoba membuat programnya untuk mempermudah temen-temen semua untuk menghitungnya, langsung saja kita lihat sourcecodenya di bawah ini untuk dicoba di run menggunakan <a href="http://www.4shared.com/file/UWxkePvi/Borland_C_502.html">Borland C++</a> atau dengan yang lainnya, silahkan dicoba:</span><br />
<br />
#include <iostream.h><br />
#include <conio.h><br />
#include <stdio.h><br />
<a name='more'></a>main(){<br />
double bb, tb, a, b, c;<br />
<br />
cout<<"masukan berat badan anda(kg):";<br />
cin>>bb;<br />
cout<<"Masukkan tinggi badan anda(m):";<br />
cin>>tb;<br />
a=(tb-110);<br />
b=a;<br />
cout<<"\n";<br />
cout<<"Berat Badan anda ="<<bb<<endl;<br />
cout<<"\nBerat badan ideal ="<<b<<endl;<br />
c=bb-b;<br />
cout<<"\nselisih dari berat badan ideal ="<<c<<endl;<br />
<br />
if (b<bb)<br />
cout<<"\nBerat badan anda kurang ideal!";<br />
else if (b>bb)<br />
cout<<"\nBerat badan anda ideal!";<br />
getch();<br />
return 0;<br />
}</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;">setelah semuanya diketik menggunakan borland maka hasilnya akan seperti berikut ini:</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbU-wEZiIC5IRnKgqGElga_IVg6V2G4o-O-_k2jBst899cV8cAvvWE9IV-cBGq5ZAzVhe6odL5HhKBIrf_loUK79a4CHSHeKWpVrYKuawjTIhqq88mD4DvOx4n9Qb8mfYBYKuMdrn6xEo/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"> <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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbU-wEZiIC5IRnKgqGElga_IVg6V2G4o-O-_k2jBst899cV8cAvvWE9IV-cBGq5ZAzVhe6odL5HhKBIrf_loUK79a4CHSHeKWpVrYKuawjTIhqq88mD4DvOx4n9Qb8mfYBYKuMdrn6xEo/s1600/sourcecode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbU-wEZiIC5IRnKgqGElga_IVg6V2G4o-O-_k2jBst899cV8cAvvWE9IV-cBGq5ZAzVhe6odL5HhKBIrf_loUK79a4CHSHeKWpVrYKuawjTIhqq88mD4DvOx4n9Qb8mfYBYKuMdrn6xEo/s320/sourcecode.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="color: black; font-family: "Times New Roman","serif"; font-size: 12pt;"> </span><span style="color: black;">dan setelah itu untuk run kilik saja ctrl+F9 hasilnya sebagai berikut:</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8D82fKNZsMTG3Ya3Cm-RvK7NdzaJnIzSiM7uCsah15xFzmu97Zm8vs7yqt8m4iwoBpA_MCV_r_EX3V7uucOJyZiu3gYNDKlmFQV64ENSw7CTEv2TqTkmdbKFJksvglKaOF0uGbOs59So/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8D82fKNZsMTG3Ya3Cm-RvK7NdzaJnIzSiM7uCsah15xFzmu97Zm8vs7yqt8m4iwoBpA_MCV_r_EX3V7uucOJyZiu3gYNDKlmFQV64ENSw7CTEv2TqTkmdbKFJksvglKaOF0uGbOs59So/s320/hasil.jpg" width="320" /></a></div><div class="MsoNormal"><span style="color: black;">dari percobaan diatas saya memasukan berat badan 45 dan tinggi 150 maka untuk hasil berat badan idealnya adalah 40. demikian lah demonya...silahkan di coba...semoga bermanfaat....</span></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com1tag:blogger.com,1999:blog-4721945912387687465.post-15074278248746661132011-04-03T21:12:00.000+07:002011-04-03T21:12:41.876+07:00Tugas Kelompok<div dir="ltr" style="text-align: left;" trbidi="on"><!--[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: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:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
</style> <![endif]--> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span style="font-family: "BroadwayEngraved BT";">Tugas kelompok</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><b><span>Simulasi membeli bahan bakar dengan spesifikasi :</span></b></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span>Input berupa : uang/berapa liter yang akan dibeli, Jenis bahan bakar yang akan dibeli </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span>Output menyatakan : Jumlah liter yang dibeli (bila input berupa uang)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"></div><a name='more'></a><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>class BBM {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>private:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>float uang, pilihan;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>double hasil1,hasil2,hasil3;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>void Set_Pilihan(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\t^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\t|<span> </span>SPBU BARU<span> </span>|"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\t^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\tpilihan jenis BBM"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"1.bensin"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"2.solar"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"3.pertamax"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\n\nmasukkan urutan pilihan jenis BBM 1..3 :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>pilihan;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>if (pilihan==1){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"1.bensin"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\nmasukkan uang anda :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>uang;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>hasil1=uang/4500;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>for (double i=0.1; i<=hasil1; i=i+0.0001){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<i<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"bensin yang anda dapat :"<<hasil1<<" "<<"liter"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>if (pilihan==2){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"2.solar"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\nmasukkan uang anda :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>uang;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>hasil2=uang/4200;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>for (double j=0.1; j<=hasil2; j=j+0.0001){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<j<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"bensin yang anda dapat :"<<hasil2<<" "<<"liter"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>if (pilihan==3){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"3.petamax"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\nmasukkan uang anda :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>uang;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>hasil3=uang/7000;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>for (double k=0.1; k<=hasil3; k=k+0.0001){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<k<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"bensin yang anda dapat :"<<hasil3<<" "<<"liter"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>};</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">int main(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>int x;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>BBM B;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>B.Set_Pilihan();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>x;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>return 0;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">maka sourcecode diatas setelah di run akan tampil seperti pada gambar berikut:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEvaAi7I757rE21BaaE6Sn37eBCdALVoHYyAWDALqgS41IahDQymUCL_Vn-5PNYRtNKR3VakvSKDNZhxqGicXZtVRHqbFvAEwyBja-dPZV0u-ZanhjUnAl_WqNwskWhE5MXEEXUQ-uOH8/s1600/hasil+1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEvaAi7I757rE21BaaE6Sn37eBCdALVoHYyAWDALqgS41IahDQymUCL_Vn-5PNYRtNKR3VakvSKDNZhxqGicXZtVRHqbFvAEwyBja-dPZV0u-ZanhjUnAl_WqNwskWhE5MXEEXUQ-uOH8/s320/hasil+1.jpg" width="320" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> setelah semua itu d isi maka klik enter dan hasilnya seperti gambar di bawah ini:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo6nlo1lcTwWGsRTCmcXwsdxJoen_xEn8TRrcEUGk33ivzkspAO9JR4jKWfhnYywHL0I3Ie8eaqZ0hMa9-sQBT8nuwOFQK803m-GHel08PyKlJnmm8d4mJD7IrftMrYTArMGj7d71DnU0/s1600/hasil+2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo6nlo1lcTwWGsRTCmcXwsdxJoen_xEn8TRrcEUGk33ivzkspAO9JR4jKWfhnYywHL0I3Ie8eaqZ0hMa9-sQBT8nuwOFQK803m-GHel08PyKlJnmm8d4mJD7IrftMrYTArMGj7d71DnU0/s320/hasil+2.jpg" width="320" /> </a></div><div class="separator" style="clear: both; text-align: left;">demikianlah hasil program dari kelompok kami. </div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-74552322093924160222011-04-03T09:25:00.002+07:002011-04-21T23:47:35.434+07:00Program untuk Menghitung Skala<div dir="ltr" style="text-align: left;" trbidi="on"><ul></ul><div style="color: #741b47;">Program untuk Menghitung Skala</div><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: 0.5in;">Kali ini saya akan mendemokan suatu program yang cukup mudah untuk di pahami yaitu program untuk menghitung skala, dengan cara membandingkan jarak pada gambar dengan jarak </div>sebenarnya yang bisa kita aplikasikan pada suatu program seperti padaprogram di bawah ini:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Ini adalah sourcecode nya: </div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
<a name='more'></a><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">#include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> class skala {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> private:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> int jp, js;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> float skala;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> void Set_skala(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"menghitung skala"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"silahkan masukkan jarak pada peta :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>jp;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"silahkan masukkan jarak sebenarnya :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>js;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"\n";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> void Set_Info(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> skala = (jp/js);</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cout<<"maka skalanya adalah 1:"<<skala<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> }</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> };</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> int main(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> int x;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> skala P;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> P.Set_skala();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> P.Set_Info();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> cin>>x;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"> return 0;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Di sini saya menggunakan Borland C++ dan setelah di tulis sourcecode diatas akan terlihat seperti pada gambar di bawah ini:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTwU11-7N5I2twUeUPRugILAjZJgsHKCbUD2OHhWwFxjuPS_ihAoey75GoOpjp5w5afTaFV2Jh4Tsj23L50vb9icgFlfVGk0WsVqPwVap-D3_F6ZIW8XCkoOAW5HnRLOVeNJs34CL8u9s/s1600/source+code.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTwU11-7N5I2twUeUPRugILAjZJgsHKCbUD2OHhWwFxjuPS_ihAoey75GoOpjp5w5afTaFV2Jh4Tsj23L50vb9icgFlfVGk0WsVqPwVap-D3_F6ZIW8XCkoOAW5HnRLOVeNJs34CL8u9s/s320/source+code.jpg" width="320" /> <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><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;"> </span></m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></a></div><div style="text-align: left;"><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Setelah program diatas ditulis selanjutnya tekan tombol ctrl F9 atau klik Run maka hasilnya akan tampil pada layar sebagai berikut:</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS5J4I3K6nkQ75EMHDrH8IJBR7ohsleJXcXTGOzwrbOosUB_TQGR0HT_L-YuCNMVTa29fDO8P_jQDWgLq9Uza3Ehg3zfw5TtpFfUugtz3kP-eMCn6e3mzAwnCQFtaqLNLxwzBf8l_zF3o/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS5J4I3K6nkQ75EMHDrH8IJBR7ohsleJXcXTGOzwrbOosUB_TQGR0HT_L-YuCNMVTa29fDO8P_jQDWgLq9Uza3Ehg3zfw5TtpFfUugtz3kP-eMCn6e3mzAwnCQFtaqLNLxwzBf8l_zF3o/s320/hasil.jpg" width="320" /> </a></div><div class="separator" style="clear: both; text-align: left;"><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> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac></div><div class="MsoNormal" style="line-height: 150%; text-align: justify;">Disini saya memasukan jarak pada peta yaitu 25 dan jarak sebenarnya 2 maka skalanya adalah 1:12, <br />
Demikian program untuk menghitung skala. jika masih banyak kesalahan mohon dikomentar ya.. :)</div><div class="MsoNormal" style="line-height: 150%; text-align: justify;"><br />
</div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0tag:blogger.com,1999:blog-4721945912387687465.post-21780402640900987442011-04-02T23:29:00.000+07:002011-04-21T23:44:13.320+07:00Program untuk Menghitung Kecepatan<div dir="ltr" style="text-align: left;" trbidi="on"><!--[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: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:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
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-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style> <![endif]--> </m:defjc></m:rmargin></m:lmargin></m:dispdef></m:smallfrac><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">Nah pada kesempatan kaliini saya akan membuat program untuk menghitung kecepatan…disini saya menggunakan Borland C++ juga,untuk cara kerja program ini adalah dengan membagi jarak (s) oleh waktu (t)…mudah bukan… begitulah gambaran singkat mengenai program ini, langsung saja kita coba source code yang sudah saya berikut ini:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">include <iostream.h></div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>class kecepatan {</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>private:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> <a name='more'></a> </span>int s, t;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>float kecepatan;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>public:</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>void Set_kecepatan(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"menghitung kecepatan"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"silahkan masukkan jarak :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>s;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"silahkan masukkan waktu :";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>t;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"\n";</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>void Set_hasil(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>kecepatan = (s/t);</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cout<<"maka kecepatannya adalah"<<" "<<kecepatan<<" "<<"km/jam"<<endl;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>};</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>int main(){</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>int y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>kecepatan P;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>P.Set_kecepatan();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>P.Set_hasil();</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>cin>>y;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><span> </span>return 0;</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">}</div><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"><br />
</div><span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 115%;">Dan setelah di run hasilnya adalah seperti pada gambar berikut:</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4GQ6jmgbiJ5ybP_kPm6hz10XC2pFFr9PPAyxt-M9H71gby0NQF9GN4U72D7ukM6eH6u6ayZJA6NqbGKsiR9QwvEVYNNtvsOOBA2i-grvOu6rIi9gxFYC1EYIbU9xpaaGyPoKtSCd9nus/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4GQ6jmgbiJ5ybP_kPm6hz10XC2pFFr9PPAyxt-M9H71gby0NQF9GN4U72D7ukM6eH6u6ayZJA6NqbGKsiR9QwvEVYNNtvsOOBA2i-grvOu6rIi9gxFYC1EYIbU9xpaaGyPoKtSCd9nus/s320/hasil.jpg" width="320" /> </a></div><div class="separator" style="clear: both; text-align: left;">gambar diatas adalah hasil dari programnya dari contoh saya mencoba memasukkan jarak:25, waktunya:5, maka kecepatannya adalah 5km/jam<br />
demikianlah programnya....mudah bukann... silahkan dicoba...semoga bermanfaat... :)</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4GQ6jmgbiJ5ybP_kPm6hz10XC2pFFr9PPAyxt-M9H71gby0NQF9GN4U72D7ukM6eH6u6ayZJA6NqbGKsiR9QwvEVYNNtvsOOBA2i-grvOu6rIi9gxFYC1EYIbU9xpaaGyPoKtSCd9nus/s1600/hasil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br />
</a></div></div>Yusuf Bintorohttp://www.blogger.com/profile/18042450987057792964noreply@blogger.com0