#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
#include <cstring.h>//header yang du gunakan untuk mendeklarasikan tipe data string
char* biodata()
{
string nama;
string kelas;
string npm;
cout<<“|Masukan Nama Anda  : “;getline(cin, nama);
cout<<“|Masukan Kelas Anda : “;getline(cin, kelas);
cout<<“|Masukan NPM Anda   : “;getline(cin, npm);
cout<<“======================================”;
cout<<“\n———————————————–“;
cout<<“\n***********************************************”;
cout<<“\n|Nama Anda  : “<<nama;
cout<<“\n|Kelas Anda : “<<kelas;
cout<<“\n|NPM Anda   : “<<npm;
return 0;
}
float masukan(float uas, float uts)
{
br:
float rata;
cout<<“\n\t******************************”;
cout<<“\n\tMasukan Biodata Dan Nilai Anda”;
cout<<“\n\t******************************\n”;
cout<<“\n======================================\n”;
cout<<“|Masukan Nilai UTS  : “;cin>>uts;
cout<<“|Masukan Nilai UAS  : “;cin>>uas;
if(uts>100 | uas>100){
cout<<“|Nilai Yang Anda Masukan Salah”;
goto br;}
else {
rata=(uts*0.75)+(uas*0.25); }
return rata;
}

void main(float UAS, float UTS)
{
kembali :
clrscr();
int x;
float RATA = masukan(UAS,UTS);
cout<<biodata();
cout<<“\n|Nilai Anda : “<<RATA;
cout<<“\n***********************************************”;
cout<<“\n———————————————–\n”;
{
if(RATA>=85 & RATA<=100)
cout<<“\nAnda Mendapat Grade A dan Anda Lulus\n”;
else if(RATA>=70 & RATA<=84)
cout<<“\nAnda Mendapat Grade B dan Anda Lulus\n”;
else if(RATA>=60 & RATA<=69)
cout<<“\nAnda Mendapat Grade C dan Anda Lulus\n”;
else if(RATA>=45 & RATA<=59)
cout<<“\nAnda Mendapat Grade D dan Anda Tidak Lulus\n”;
else
cout<<“\nAnda Mendapat Grade E dan Anda Harus Mengulang\n”;
}
cout<<“\n***********************************************”;
cout<<“\nMasukan Pilihan”<<endl;
cout<<“1.Masukan Ulang    “<<endl;
cout<<“2.Exit         “<<endl;
cout<<“\nMasukan Pilihan [1..2] : “;cin>>x;
cout<<“\n***********************************************\n”;
if(x==1)
{
goto kembali;}
else  {
int d;
clrscr();
for(d=1;d<=20;d++){
cout<<“Bye Bye Sampai Jumpa Lagi [“<<d<<“]\n”;}
exit(0);}
getch();
}