Program ini dibuat saat  sedang praktikum Dasar Algoritma dan Pemrograman di Laboratorium Komputasi dan Jaringan Teknik Elektro. Funsinya untuk mencari nilai rata-rata dan mengkonversinya dalam bentuk nilai berupa huruf A-E.

Untuk lebih lengkap informasi Laboratorium Komputasi dan Jaringan Teknik Elektro, langsung dikunjungi saja http://elektro.ub.ac.id/lab-dpk
#include<stdio.h>
#include<conio.h>
char nama [100],
nim [100],
program [100],
huruf [100];
int  pre,
praktikum,
jilid,
post,
rata;int main ()
{
printf(“____________________________________________________________________\n”);
printf(“Nama\t\t:”);
scanf(“%s”,& nama);
printf(“Nim\t\t:”);
scanf(“%s”,& nim);
printf(“Program Studi\t:”);
scanf(“%s”,& program);
printf(“____________________________________________________________________\n”);
printf(“Program Penghitung NIlai Praktikum DPK\n”);
printf(“Nilai Pre Test\t\t:”);
scanf(“%i”,& pre);
printf(“Nilai Praktikum\t\t:”);
scanf(“%i”,& praktikum);
printf(“Nilai Jilid\t\t:”);
scanf(“%i”,& jilid);
printf(“Nilai Post Test\t\t:”);
scanf(“%i”,& post);
printf(“____________________________________________________________________\n”);rata = (pre+praktikum+jilid+post)/4;

printf(“Nilai Rata-rata\t\t:%i\n”, rata);

if (rata<40)
{
printf(“Nilai Huruf\t\t:E\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>=41&&rata<=50)
{
printf(“Nilai Huruf\t\t:D\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>=51&&rata<=60)
{
printf(“Nilai Huruf\t\t:D+\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>=61&&rata<=65)
{
printf(“Nilai Huruf\t\t:C\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>=66&&rata<=70)
{
printf(“Nilai Huruf\t\t:C+\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>=71&&rata<=75)
{
printf(“Nilai Huruf\t\t:B\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>=76&&rata<=80)
{
printf(“Nilai Huruf\t\t:B+\n”);
printf(“____________________________________________________________________\n”);
}
else if (rata>80)
{
printf(“Nilai Huruf\t\t:A\n”);
printf(“____________________________________________________________________\n”);
}
getch ();
return 0;
}

Picture