#include<stdio.h>
main()
{
printf("==============================\n");
printf("=PROGRAM NILAI RATA2 MAHASIWA=\n");
printf("==============================\n");
float y,a,b,c,d,e,f;
char x[100];
printf("masukan nama=");
scanf("%s",&x);
printf("masukan nim=");
scanf("%s",&y);
printf("masukan nilai 1=");
scanf("%f",&a);
printf("masukan nilai 2=");
scanf("%f",&b);
printf("masukan nilai 3=");
scanf("%f",&c);
printf("masukan nilai 4=");
scanf("%f",&d);
printf("masukan nilai 5=");
scanf("%f",&e);
f=(a+b+c+d+e)/5;
printf("nama mahasiswa =%s\n",x);
printf("nim mahasiswa =%i\n",y);
printf("rata nilai =%4.2f",f);
}
Tidak ada komentar:
Posting Komentar