Program C++

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

struct nilai_mahasiswa
{
char npm[10];
char nama[45];
char ket[50];
char n_h[30];
int nilai;
int n_a;
};
void main()
{
nilai_mahasiswa nilai_mhs;
cout<<“Input Nilai Mahasiswa\n”;
cout<<“_____________________________\n”;
cout<<“NPM    :”;
cin>>nilai_mhs.npm;
cout<<“Nama        :”;
cin>>nilai_mhs.nama;
cout<<“Nilai        :”;
cin>>nilai_mhs.nilai;
cout<<“Nilai Huruf  :”;
cin>>nilai_mhs.n_h;

cout<<“Keterangan Nilai    :”;
cin>>nilai_mhs.ket;
cout<<“_________________________________\n”;

cout<<“Nilai yang telah anda input\n”;
cout<<“______________________________\n”;
cout<<“NPM            :”<<nilai_mhs.npm<<endl;
cout<<“Nama          :”<<nilai_mhs.nama<<endl;
cout<<“Nilai      :”<<nilai_mhs.nilai<<endl;
cout<<“Nilai Huruf    :”<<nilai_mhs.n_h<<endl;
cout<<“______________________________\n”;
cout<<“Keterangan nilai    :”<<nilai_mhs.ket<<endl;
cout<<“______________________________\n”;

}
Maka hasilnya

Leave a comment

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