Rabu, 05 Oktober 2011

Test program -gaji pegawai-

demo template blog and download free blogger template feature like magazine style, ads ready and seo friendly template blog

Nama    : PrasetyoAdiNugroho
Kelas     : 1i05
Npm      : 55410366
Judul     : Program penghitungangajihpegawai (dengan THR)






Listing Program



defpersenthr(yn):
ifyn=='n':
print 'Selesai';
else:
print '+-----------------------+';
print '|       GAJI PEGAWAI    |';
print '+-----------------------+';
print '';
data=[['23','45','66'],['Agus','Bobby','Cindra'],[2000000,1000000,3000000]];
print 'NIP\tNama\tGaji';
for i in range(0,3):
      print str(data[0][i])+'\t'+str(data[1][i])+'\t'+str(data[2][i])+'';
print '';
thr=input('Tambahanthrdalampersen % : ');
print '';
print 'NIP\tNama\tGaji\tTHR\tTotal';
for i in range(0,3):
      print str(data[0][i])+'\t'+str(data[1][i])+'\t'+str(data[2][i])+'\t'+str((data[2][i])*thr/100)+'\t'+str((data[2][i]+((data[2][i])*thr/100)))+'';
    x=raw_input('\nUlangi program THR (y/n) : ');
persenthr(x); 
persenthr('y');  





Output

0 komentar:

Posting Komentar