Thursday, January 19, 2012

Nilai IPK (Borland C++)

/*
#-----------------------------
# Nilai IPK
#-----------------------------
Ket :
nm = Nama jr = Jurusan
nim = Nim ni = Nilai
kls = Kelas

Jika nilai iput lebih besar sama dengan 90 nilai A
Jika nilai iput lebih besar sama dengan 80 nilai B
Jika nilai iput lebih besar sama dengan 70 nilai C
Jika nilai iput lebih besar sama dengan 60 nilai D
*/

#include<stdio.h>
#include<conio.h>
void main()
{
int ni;
char nm[50];
char nim[50];
char kls[50];
char jr[50];
printf("Input Nama : ");scanf("%s",&nm);
printf("Input Nim : ");scanf("%s",&nim);
printf("Input Kelas : ");scanf("%s",&kls);
printf("Input Jurusan : ");scanf("%s",&jr);
printf("Input Nilai   : ");scanf("%d",&ni);
if (ni>=90)
printf("Nilai Anda A\nAnda LULUS");
else if (ni>=80)
printf("Nilai Anda B\nAnda LULUS");
else if (ni>=70)
printf("Nilai Anda C\nAnda LULUS");
else if (ni<=60)
printf("Nilai Anda D\nAnda Belum LULUS");
getch();
}

I am a fan of technology and i love coffee. I’m also interested in web programming and networking. below there are some accounts you can follow to contact me.