ne tugas besar uka gan, smester 1.
buat tmen" smester baru, ne tugas konversi huruf ke angka,
tinggal copas ajjah yang cetak tebal..
#include
#include
#include
main()
{
int i, jumlah;
char ip;
struct{
unsigned int fis;
unsigned int kim;
unsigned int kalk;
unsigned int ing;
unsigned int mat;
unsigned int jarkom;
unsigned int base;
unsigned int infor;
unsigned int pemro;
unsigned int mulmed;
float ip;
}nilai[100];
for(i=1;i<=1;i++) { printf("\n\nDaftar IP Mahasiswa : \n\n"); printf("nilai fis : "); scanf("%d",&nilai[i].fis); printf("nilai kim : "); scanf("%d",&nilai[i].kim); printf("nilai kalk : "); scanf("%d",&nilai[i].kalk); printf("nilai ing : "); scanf("%d",&nilai[i].ing); printf("nilai mat : "); scanf("%d",&nilai[i].mat); printf("nilai jarkom : "); scanf("%d",&nilai[i].jarkom); printf("nilai base : "); scanf("%d",&nilai[i].base); printf("nilai infor : "); scanf("%d",&nilai[i].infor); printf("nilai pemro : "); scanf("%d",&nilai[i].pemro); printf("nilai mulmed : "); scanf("%d",&nilai[i].mulmed); } printf("------------------------------------------------------------------\n"); printf(" DAFTAR IP MAHASISWA \n"); printf(" PTI UM MALANG \n"); printf("------------------------------------------------------------------\n"); printf("| N0 | MATA KULIAH | NILAI ANGKA | NILAI HURUF | \n"); printf("------------------------------------------------------------------\n"); printf("| 1 | FISIKA | | |\n"); printf("| 2 | KIMIA | | |\n"); printf("| 3 | KALKULUS | | |\n"); printf("| 4 | BAHASA INGGRIS | | |\n"); printf("| 5 | MATEMATIKA DISKRIT | | |\n"); printf("| 6 | JARINGAN KOMPUTER | | |\n"); printf("| 7 | DATABASE | | |\n"); printf("| 8 | SISTEM INFORMASI | | |\n"); printf("| 9 | PEMROGAMAMAN KOMPUTER| | |\n"); printf("| 10 | MULTIMEDIA | | |\n"); printf("------------------------------------------------------------------\n"); for(i=1;i<=1;i++) { nilai[i].ip=(nilai[i].fis+nilai[i].kim+nilai[i].kalk+nilai[i].ing+nilai[i].mat+nilai[i].jarkom+nilai[i].base+nilai[i].infor+nilai[i].pemro+nilai[i].mulmed)/10; if((nilai[i].ip>=85)&&(nilai[i].ip<=100)) ip='A'; else if((nilai[i].ip>=75)&&(nilai[i].ip<=84)) ip='B'; else if((nilai[i].ip>=65)&&(nilai[i].ip<=74)) ip='C'; else if((nilai[i].ip>=55)&&(nilai[i].ip<=64))
ip='D';
else
if(nilai[i].ip<55)
ip='E';
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
cout<<"\t\t"<
printf("-------------------------------------------------------------\n");
}
return 0;
}
cikidot gan, program ini kurang sempurna, toloong disempurnain.
slamat mencoba....
Tidak ada komentar:
Posting Komentar