FLOWCHART & bahasa C++

 

SOURCE CODE

#include
#include

typedefstructmhs
{
charnim[10];
charnama[20];
intuas,uts,tugas,ipk;
};

mhs A[14];

voidinputmhs(intjml);
voidpredikat(intipk);
voidtampilmhs(intjml);

voidinputmhs(intjml)
{
int i;
for(i=1;i85)
printf(“A\n”);
else if (ipk>70)
printf (“B\n”);
else if (ipk>50)
printf(“C\n”);
else
printf(“D\n”);
}

voidtampilmhs(intjml)
{
int i;
printf(“====================================================================\n”);
printf(“NIM \tNAMA\tUAS\tUTS\tTUGAS\tTOTAL\tIPK\t\n”);
printf(“====================================================================\n”);
for (i=1;i<=jml;i++)
{
printf(“%s\t”,A[i].nim);
printf(“%s\t”,A[i].nama);
printf(“%i\t”,A[i].uas);
printf(“%i\t”,A[i].uts);
printf(“%i\t”,A[i].tugas);
intipk;
ipk = ((A[i].uas*2)+(A[i].tugas)+(A[i].uts))/4;
printf(“%i\t”,ipk);
huruf(ipk);
}
printf(“====================================================================\n”);
};

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: