PROGRAM PRESTASI
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nilai1, nilai2, rata_rata;
printf("Program Prestasi \n\n");
printf("ketik nilai UTS = ");
scanf("%d",&nilai1);
printf("ketik nilai UAS = ");
scanf("%d",&nilai2);
rata_rata=(nilai1+nilai2)/2;
printf("rata rata nilai adalah %d\n",rata_rata);
if((rata_rata>=75)&&(rata_rata<=100))
printf("Prestasi anda baik");
else if((rata_rata>=50)&&(rata_rata<=74))
printf("Prestasi anda sedang");
else if((rata_rata>=0)&&(rata_rata<=49))
printf("Prestasi anda kurang");
else
printf("input data salah");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nilai1, nilai2, rata_rata;
printf("Program Prestasi \n\n");
printf("ketik nilai UTS = ");
scanf("%d",&nilai1);
printf("ketik nilai UAS = ");
scanf("%d",&nilai2);
rata_rata=(nilai1+nilai2)/2;
printf("rata rata nilai adalah %d\n",rata_rata);
if((rata_rata>=75)&&(rata_rata<=100))
printf("Prestasi anda baik");
else if((rata_rata>=50)&&(rata_rata<=74))
printf("Prestasi anda sedang");
else if((rata_rata>=0)&&(rata_rata<=49))
printf("Prestasi anda kurang");
else
printf("input data salah");
return 0;
}
Comments
Post a Comment