Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Program.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ResponsiPemrog2308 { class Program { static void Main(string[] args) { Karyawan k1 = new Karyawan("18112357","Andre",3000000); Cetak(k1); Karyawan k2 = new Karyawan("18112234","Jono",2000000); Cetak(k2); Console.WriteLine("\nAlhamdulillah gaji naik 10%\n"); Cetak2(k1); Cetak2(k2); Console.ReadKey(); } static void Cetak(Karyawan k) { if(k.Nama == "Andre") { Console.WriteLine("No. Nik/Nama Gaji Bulanan"); Console.WriteLine("---------------------------------------"); Console.WriteLine("1. {0}/{1} {2}", k.Nik, k.Nama, k.GajiBulanan); } else { Console.WriteLine("2. {0}/{1} {2}", k.Nik, k.Nama, k.GajiBulanan); } } static void Cetak2(Karyawan i) { int naik, total; naik = (10 * i.GajiBulanan) / 100; total = i.GajiBulanan + naik; if (i.Nama == "Andre") { Console.WriteLine("No. Nik/Nama Gaji Bulanan"); Console.WriteLine("---------------------------------------"); Console.WriteLine("1. {0}/{1} {2}", i.Nik, i.Nama, total); } else { Console.WriteLine("2. {0}/{1} {2}", i.Nik, i.Nama, total ); } } } }
run
|
edit
|
history
|
help
0
Dotnet Q-3
2. Basic types: List
dfdfd
A
Клас cstatic
asdxscddasdcf
Merge Sort
FromBibleC#(OOP)
n th to last element
asxsd