RSS

Hitung Nilai

#include <stdio.h>

void main()

{
int nilai;
ulang:

printf(“Masukkan Nilai: “);
scanf(“%d”,&nilai);

if(nilai<=40){
printf(“\tNilai anda adalah: E\n”);
}else if(40<nilai && nilai<=55){
printf(“\tNilai anda adalah: D\n”);
}else if(55<nilai && nilai<=60){
printf(“\tNilai anda adalah: C\n”);
}else if(60<nilai && nilai<=65){
printf(“\tNilai anda adalah: BC\n”);
}else if(65<nilai && nilai<=70){
printf(“\tNilai anda adalah: B\n”);
}else if(70<nilai && nilai<=80){
printf(“\tNilai anda adalah: AB\n”);
}else if(80<nilai && nilai<=100){
printf(“\tNilai anda adalah: A\n”);
}
goto ulang;
}

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: