Linked List Pegawai Anak C Main Program Version 1.0 (Unstable)


  1. #include "PegawaiAnak.h"
  2. #include "stdio.h"
  3.  
  4. int main()
  5. {
  6.     LP lp;
  7.     createList(&lp);
  8.     infoPeg p;
  9.     infoAnak a;
  10.     char nmAnak[15];
  11.     int id,i,count, countAnak, pil;
  12.     printf("\n Ingin memasukkan berapa data pegawai? : ");
  13.     scanf("%d", &count);
  14.     for (i=0; i<count; i++)
  15.     {
  16.         printf("Data pegawai ke %d", i+1);
  17.         p = inputPeg();
  18.         inputVPeg(&lp, p);    
  19.     }
  20.     printf("\n Ingin memasukkan berapa anak?");
  21.     scanf("%d", &countAnak);
  22.     for (i=0; i<countAnak;i++)
  23.     {
  24.         printf("Data anak ke %d", i+1);
  25.         a = inputAnak();
  26.         printf("\nmasukkan ID pegawai orang tua anak : ");
  27.         scanf("%d", &id);
  28.         inputVAnak(&lp, a, id);
  29.     }
  30.     printf("\n Data pegawai lengkap");
  31.     ListPegLengkap(lp);
  32.     printf("\nOrangtua yang mendapat tunjangan");
  33.     ListTunjAnak(lp);
  34.     printf("\nOrangtua yang tidak memakai KB");
  35.     ListPegNonKB(lp);
  36.     printf("\nMasukkan nama anak yang ingin dicari orang tuanya: ");
  37.     scanf("%s", &nmAnak);
  38.     OrtuAnak(lp, nmAnak);
  39.    
  40.     return 0;
  41.    
  42. }
  43.  

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