Membuat Biodata menggunakan Bahasa C++

Modul 1

/*###############################

Nama          : Haidi

Nim/No.Reg    : 49031064

Jurusan              : TKJMD

################################*/

#include <iostream>//mengakses file library iostream

using namespace std; ;//dengan adanya fungsi ini, maka tidak perlu menuliskan source code std::cout << cukup dengan cout <<

 

int main()//fungsi utama

{

char nama[50], alamat[50], tlahir[50],jkelamin[50],notelp[50],

pekerjaan[50],email[50],website[50];//deklarai variabel bertipe char

cout << “==============================================\n”;

cout << ”            Daftar Riwayat Hidup           \n”;

cout << “==============================================\n”;

cout <<“Nama         : “;//perintah output

cin.getline(nama,50);//perintah input

cout <<“Alamat             : “;//perintah output

cin.getline(alamat,50);//perintah input

cout <<“T.Lahir            : “;//perintah output

cin.getline(tlahir,50);//perintah input

cout <<“J. Kelamin   : “;//perintah output

cin.getline(jkelamin,50);//perintah input

cout <<“No. Tlp            : “;//perintah output

cin.getline(notelp,50);//perintah input

cout <<“Pekerjaan    : “;//perintah output

cin.getline(pekerjaan,50);//perintah input

cout <<“Email        : “;//perintah output

cin.getline(email,50);//perintah input

cout <<“Website            : “;//perintah output

cin.getline(website,50);//perintah input

cout <<“Jurusan            : Teknik Elektro – STEI – ITB \n”;//perintah output

 

return 0;//nilai balikkan dari fungsi main() adalah 0

}

Modul1

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