Friday, 20 November 2015

Konversi Suhu dengan C++ Lengkap

Assalamualaikum wr. wb

kali ini saya akan share source code c++ cara konversi suhu lengkap, kira-kira tampilannya seperti ini

source code nya:

/*Syaiful Romadhon
Sistem Informasi 2015
STT Terpadu Nurul Fikri*/


#include<iostream>
#include<cmath>
using namespace std;


int main()
{
int kode, kodeconv;
double nil;


cout << "====================================" << endl;
cout << "             KONVERSI SUHU          " << endl;

cout << "       www.ssngeblog.blogspot.com   " << endl; 
cout << " celcius, Fahrenheit, Reamur, Kelvin" << endl;
cout << "====================================" << endl;
cout<<"Masukkan nilai awal = ";cin>>nil;
cout<< "Masukkan suhu dalam: "<<endl;
cout<<"1. Celcius"<<endl;
cout<<"2. Fahrenheit"<<endl;
cout<<"3. Reamur"<<endl;
cout<<"4. Kelvin"<<endl;
cout<<"kode = ";cin>>kode;
cout<< "Dikonversikan ke dalam: "<<endl;
cout<<"1. Celcius"<<endl;
cout<<"2. Fahrenheit"<<endl;
cout<<"3. Reamur"<<endl;
cout<<"4. Kelvin"<<endl;
cout<<"kode = ";cin>>kodeconv;

if (kode==1 and kodeconv ==1)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Celcius : " <<nil<<endl;
}
else if (kode == 1 and kodeconv == 2)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " fahrenheit : " <<(nil*1.8+32)<<endl;

}
else if (kode == 1 and kodeconv == 3)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Reamur  : " <<(nil*0.8)<<endl;

}
else if (kode == 1 and kodeconv == 4)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Kelvin : " <<(nil+ 273.15)<<endl;

}
else if (kode==2 and kodeconv ==1)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Celcius : " <<((nil+459.67)/1.8)<<endl;
}
else if (kode == 2 and kodeconv == 2)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " fahrenheit : " <<nil<<endl;

}
else if (kode == 2 and kodeconv == 3)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Reamur  : " <<((nil-32)/2.25)<<endl;

}
else if (kode == 2 and kodeconv == 4)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Kelvin : " <<((nil-32)/1.8)<<endl;

}
else if (kode == 3 and kodeconv ==1)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Celcius : " <<(nil/0.8)<<endl;
}
else if (kode == 3 and kodeconv == 2)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " fahrenheit : " <<(nil*2.25+32)<<endl;

}
else if (kode == 3 and kodeconv == 3)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Reamur  : " <<nil<<endl;

}
else if (kode == 3 and kodeconv == 4)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Kelvin : " <<(nil/0.8+273.15)<<endl;

}
else if (kode == 4 and kodeconv ==1)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Celcius : " <<(nil-273.15)<<endl;
}
else if (kode == 4 and kodeconv == 2)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " fahrenheit : " <<(nil*1.8-459.67)<<endl;

}
else if (kode == 4 and kodeconv == 3)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Reamur  : " <<((nil-273.15)*0.8)<<endl;

}
else if (kode == 4 and kodeconv == 4)
{
cout<<endl;
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;
cout << " Kelvin : " <<nil<<endl;

}
else
{
    cout<<"Kode yang Anda masukkan salah";
}

}

Jika butuh file mentahnya silahkan langsung download disini 
moga bermanfaat, jika ada yang mau ditanyakan silahkan corat-coret aja dibawah....

Friday, 6 November 2015

Cuma Nulis Artikel Dapat Pulsa 50 ribu

Assalamualaikum wr. wb
Udah lama nih ga posting artikel yang bermanfa'at, maklum jadi orang yang sok sibuk, hehehehe.Oya sobat blogger kali ini ane mau share yang bermanfaat banget nih bagi kalian yang suka nulis ataupun ngeblog. Kalian tau ga situs teknologi jalantikus.com ? itu loh, situs yang tiap hari update tentang dunia teknologi. Mulai sekaran, situs teknologi terbesar di Indonesia tersebut buka lowongan tulisan.

Ha? lowongan tulisan? iyah, jadi artikel yang kalian tulis bisa di posting di jalantikus.com , yang penting masih berbau teknologi, komputer dan gadget. keuntungannya, kalian bisa masang backlink blog ataupin website kalian, jadi tambah terkenal deh. Yang lebih dahsyat lagi, kalian juga punya kesempatan buat jadi tim penulis inti di jalantikus.com, W OW ...... wow keren kan. Eh, ada satu lagi hampir lupa. Jadi mulai 1 November 2015 ini artikel yang kalian tulis lolos, kalian bisa dapat pulsa 50 ribu loh per tayang. Enak banget kan, jadi ga perlu repot-repot beli pulsa. Tapi, inget loh artikel yang di tulis harus sesuai dengan etika jurnalistik. Jangan nyampah, jangan cuma copas, pokoknya buat sebagus mungkin.
udah penasaran yah gimana caranya? masuk aja nih anae kasih pintu masuknya,

Gabung jadi penulis 

kalo kurang jelas komen aja yah dibawah, asal angan kurangajar
sekian dan terima kasih

wassalamualaikum