Selamat datang di maiav3.blogspot.com => Blog "TANPO ASMO"

SCRIPT C++ PERHITUNGAN NILAI

Jumat, 18 Januari 20130 komentar


//Program Perhitungan Nilai
//created by maiaachiea

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

void main() {

clrscr();
char nama[50], npm[50], matkul[50];
float nilai_uts, nilai_uas, nilai_tugas, na, status, grade;

cout <<"\t*** PROGRAM PERHITUNGAN NILAI ***"<<endl<<endl;
cout <<"\tNAMA = "; gets(nama);
cout <<"\tNPM = "; gets(npm);
cout <<"\tMATA KULIAH = "; gets(matkul);
cout <<"\tNILAI UTS = "; cin >>nilai_uts;
cout <<"\tNILAI UAS = "; cin >>nilai_uas;
cout <<"\tNILAI TUGAS = "; cin >>nilai_tugas;
cout <<"\n=============== NILAI MATA KULIAH =============="<<endl<<endl;

nilai_uts = 0.3*nilai_uts;
nilai_uas = 0.5*nilai_uas;
nilai_tugas = 0.2*nilai_tugas;
na = nilai_uas+nilai_uts+nilai_tugas;

cout <<"\tNAMA = "<<nama<<endl
<<"\tNPM = "<<npm<<endl
<<"\tNA = "<<na<<endl;



if (na <=50) {
cout <<"\tSTATUS = TIDAK LULUS "<<endl;
}
else {
cout <<"\tSTATUS = LULUS "<<endl;
}



if (na>=91)  {
cout <<"\tGRADE = A "<<endl<<endl<<endl;
}

else if(na>=81) {
cout <<"\tGRADE = A- "<<endl<<endl<<endl;
}

else if(na>=71) {
cout <<"\tGRADE = B "<<endl<<endl<<endl;
}

else if(na>=61) {
cout <<"\tGRADE = B- "<<endl<<endl<<endl;
}

else if(na>=51) {
cout <<"\tGRADE = C "<<endl<<endl<<endl;
}

else if(na>=21) {
cout <<"\tGRADE = D "<<endl<<endl<<endl;
}

else if(na>=0) {
cout <<"\tGRADE = A "<<endl<<endl<<endl;
}


cout <<"###############################################"<<endl;
cout <<"## SELAMAT BELAJAR     ##"<<endl;
cout <<"## TINGKATKAN TERUS PRESTASI MU     ##"<<endl;
cout <<"###############################################"<<endl;





}
Share this article :

Posting Komentar

 
Support : Maia Achiea Template
Copyright © 2011. .: ^_^ :. - All Rights Reserved
Proudly powered by Blogger