Menentukan Huruf Mutu II

Posted: April 18, 2010 in Daspro
Tags:

#include<stdio.h>
#include<conio.h>
void main()
{int NIM, nama, jumlah, kehadiran, nilai_tugas, tugas, UTS, UAS, total, hurufmutu,matakul;
printf (“Program Mutu Nilai Mahasiswa\n”);
printf (“==============================\n”);
printf (“NIM :”);scanf (“%d”, &NIM);
printf (“Nama Mahasiswa :”);scanf (“%s”, &nama);
printf (“Mata Kuliah :”);scanf (“%s”,&matakul);
printf (“Jumlah Kehadiran :”);scanf (“%d”, &jumlah);
printf (“Nilai Tugas :”);scanf (“%d”, &nilai_tugas);
printf (“Nilai UTS :”);scanf (“%d”, &UTS);
printf (“Nilai UAS :”);scanf (“%d”, &UAS);
printf (“\n”);
printf (“Program Mutu Nilai Mahasiswa\n”);
printf (“==========================\n”);
printf (“Mahasiswa dengan NIM %d “, NIM);
printf (“dengan nama %s\n”, &nama);
printf (“Mata Kuliah %s\n”,&matakul);
printf (“Mendapatkan Nilai Siswa :\n”);
kehadiran=jumlah*0.1;
printf (“Kehadiran : %d\n”, kehadiran);
tugas=nilai_tugas*0.2;
printf (“Tugas : %d\n”, tugas);
UTS=UTS*0.3;
printf (“Nilai : %d\n”, UTS);
UAS=UAS*0.4;
printf (“Nilai : %d\n”, UAS);
printf (“————————\n”);
total=kehadiran+tugas+UTS+UAS;
printf (“Total : %d\n”, total);
if (total>80)
{printf (“Huruf Mutu : A\n”);}
else if ((total>=70)&&(total<79))
{printf (“Huruf Mutu : B\n”);}
else if ((total>=55)&&(total<69))
{printf (“Huruf Mutu : C\n”);}
else if ((total>=40)&&(total<54))
{printf (“Huruf Mutu : D\n”);}
else if ((total>=0)&&(total<39))
{printf (“Huruf Mutu : E\n”);}
getch();
}

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