Bab 1 no 1

Menampilkan Biodata :

Program C++ :

#include <iostream>
using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
 char n[20],a [50],ttl[20],c[20],h[50];

 cout<<"\t\t\t\tSelamat Datang Di Program Input Biodata\n\n"<<endl;
  cout<<"Nama       : ";
cin>>n;
  cout<<"Alamat     : ";
cin>>a;
  cout<<"TTL        : ";
cin>>ttl;
  cout<<"Hobi       : ";
cin>>h;
cout<<endl;
  cout<<"Cita-cita  : ";
cin>>c;

cout<<"\n\n\t\t Biodata Diri \n";
cout<<"Nama :"<<n<<"\nAlamat :"<<a
<<"\nTTL  : "<<ttl
<<"\nHobi"<<h<<endl;
cout<<"\nCita-cita  :"<<c<<endl;

return 0;
}

Output :








Raptor :





Share this

Related Posts

Previous
Next Post »