Program sederhana

24 March 2015 22:09:37 Dibaca : 76

#include <iostream.h>

int main ()
{
int C;
typedef struct
{
long NIM;
char NAMA[25];
char HOBI[30];
long NO_TELP;
}
SISWA;
SISWA A[4];

for(C=0; C<2; C++)
{
cout<<"Input Data :\n";
cout<<"NIM :";cin>>A[C].NIM;
cout<<"NAMA :";cin>>A[C].NAMA;
cout<<"HOBI :";cin>>A[C].HOBI;
cout<<"NO_TELP :";cin>>A[C].NO_TELP;
}

for(C=0; C<2; C++)
{
cout<<"Biodata Mahasiswa :\n";
cout<<"NIM :"<<A[C].NIM<<endl;
cout<<"NAMA :"<<A[C].NAMA<<endl;
cout<<"HOBI :"<<A[C].HOBI<<endl;
cout<<"NO_TELP :"<<A[C].NO_TELP<<endl;
cout<<'\n';
}
return 0;
}

Kategori

Blogroll

  • Masih Kosong