program rata-rata

/*program rata_rata*/;
#include;
int a, mahasiswa;
int nilai, total, tinggi, rendah, rata;
char nama;
main()
{
total = 0;
printf("jumlah mahasiswa : ");
scanf("%i",&mahasiswa);
{
mahasiswa=mahasiswa+1;

printf ("nama mahasiswa ke %i",mahasiswa
);
scanf ("%i",&mahasiswa);
printf ("nilai ",nama,": "); scanf ("%i",&nilai);
total = total + nilai;
}
rata = total / mahasiswa;
printf ("rata-rata nilai mahasiswa : ",rata);
}

Categories:

0 comments:

Post a Comment