Beranda > Bahasa Pemrograman > Source code C++ hitung Nilai Akhir

Source code C++ hitung Nilai Akhir

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

void main()

{

char nama_mhs[30],nim[10],mt_kuliah[30];
int n_tugas,n_uts,n_uas,n_akhir;

cout<<“***********************************”<<endl;
cout<<“**  PROGRAM HITUNG NILAI AKHIR   **”<<endl;
cout<<“***********************************”<<endl;
cout<<“Nama Mahasiswa  : “;cin.getline(nama_mhs,sizeof(nama_mhs));
cout<<“NIM             : “;cin.getline(nim,sizeof(nim));
cout<<“Mata Kuliah     : “;cin.getline(mt_kuliah,sizeof(mt_kuliah));
cout<<“Nilai Tugas     : “;cin>>n_tugas;
cout<<“Nilai UTS       : “;cin>>n_uts;
cout<<“Nilai UAS       : “;cin>>n_uas;
cout<<“***********************************”<<endl;

n_akhir=(n_tugas*0.2)+(n_uts*0.3)+(n_uas*0.5);

clrscr();
cout<<“***********************************”<<endl;
cout<<“**  PROGRAM HITUNG NILAI AKHIR   **”<<endl;
cout<<“***********************************”<<endl;
cout<<“Nama Mahasiswa     : “<<nama_mhs<<endl;
cout<<“NIM                : “<<nim<<endl;
cout<<“Mata Kuliah        : “<<mt_kuliah<<endl;
cout<<“Nilai Tugas        : “<<n_tugas<<endl;
cout<<“Nilai UTS          : “<<n_uts<<endl;
cout<<“Nilai UAS          : “<<n_uas<<endl;
cout<<“==============================”<<endl;
cout<<“Nilai Akhir        : “<<n_akhir<<endl;
cout<<“***********************************”<<endl;

}

  1. September 21, 2012 pukul 6:17 am

    fgfg

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: