Konversi Bilangan Desimal ke Biner

berikut adalah screenshot flowchartnya:

rapt

 

Codingan C++ nya

#include <iostream>
#include <conio.h>

using namespace std;

unsigned int a,b;

void konversi (unsigned int a){
if (a>1) {
konversi(a/2);
}

b = a % 2;
cout << b;

}

int main(int argc, char** argv) {
cout << “Masukkan bilangan desimal : “;
cin >> a;
cout << endl;

konversi(a);

cout << endl << endl;
cout << “tegarerputra.wordpress.com”;
return 0;
}

biner_c++

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s