AD (728x90)

Blogroll

Sabtu, 16 November 2013

Program Biodata dengan Menggunakan bahasa pemrograman C++

Share it Please
Berikut ini coding untuk membuat program menampilkan biodata :


[sourcecode languange="C++"]

#include<iostream>
#include<Windows.h>

using namespace std;
void setcolor(unsigned short color){
HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hCon, color);
}

int main(){

char tampil[5];
char nama[50], alamat[50], tlahir[50], tKelamin[50], telp[50];
char kerja[50], email[50], website[50];

setcolor(8);
cout << " ======================================================================= \n";
cout <<" DAFTAR RIWAYAT HIDUP \n";
cout <<" ======================================================================== \n";
cout <<"\n\n";
setcolor(2);
cout <<" Nama : ";
cin.getline(nama,50);
cout <<" Alamat : ";
cin.getline(alamat,50);
cout <<" Tempat tanggal lahir : ";
cin.getline(tlahir,50);
cout <<" Jenis Kelamin : ";
cin.getline(tKelamin,50);
cout <<" No Telepon : ";
cin.getline(telp,50);
cout <<" Pekerjaan : ";
cin.getline(kerja,50);
cout <<" Email : ";
cin.getline(email,50);
cout <<" Website : ";
cin.getline(website,50);
cout<<"\n\n";
setcolor(8);
cout<<"===========================================================================\n";
cout<<" ~~ Terima Kasih ~~ \n";
cin.getline(tampil,3);

system("pause");
return 0;
}

[/sourcecode]

 

output program :
output latihan

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 komentar:

Posting Komentar

© 2013 Programmer Muslim. All rights resevered. Designed by Templateism