//boy3vil
//switch case
#include <stdio.h>
int main (void)
{
int grade;
printf("input nilai (grade 1..5):");
scanf("%d", &grade);
switch (grade)
{
case 1 : printf("Fail (F) \n");
break;
case 2 : printf("Bad (D) \n");
break;
case 3 : printf("Good (C) \n");
break;
case 4 : printf("Very good (B) \n");
break;
case 5 : printf("exellent (A) \n");
break;
default :
printf("grade yang dimasukkan salah");
}
return 0;
}
Categories:
blog,
c program,
pemrograman1