0% found this document useful (0 votes)
17 views

Visual I

This document contains a C# program that calculates an employee's salary and overtime pay. It requests the employee's name and hours worked from the user as input. It then calculates the regular pay based on hours worked, overtime pay for hours over 7, and displays the total pay. The program was written by A.A. Putu Ratih Mahayoni, a student in the MO91 class with student ID 090010188.

Uploaded by

Pici-pici Bali
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Visual I

This document contains a C# program that calculates an employee's salary and overtime pay. It requests the employee's name and hours worked from the user as input. It then calculates the regular pay based on hours worked, overtime pay for hours over 7, and displays the total pay. The program was written by A.A. Putu Ratih Mahayoni, a student in the MO91 class with student ID 090010188.

Uploaded by

Pici-pici Bali
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Nama :A.

A Putu Ratih Mahayoni

Kelas :MO91

Nim :090010188
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace tugas_ratih
{
class Program
{
static void Main(string[] args)
{
String kalimat;
Console.WriteLine("Nama : A.A.Putu Ratih maha yoni");
Console.WriteLine("Nim : 090010188");
Console.WriteLine("KLS : MO91");
Console.WriteLine("===============================");
Console.WriteLine("= TUGAS PEMROGRAMAN VISUAL I =");
Console.WriteLine("===============================");
Console.WriteLine(" Program Hitung Gaji ");
Console.ReadLine();
Console.WriteLine(" Masukan nama depan anda");
kalimat= Console.ReadLine();
Console.WriteLine(" Masukan nama belakang anda");
kalimat = Console.ReadLine();
Console.WriteLine("Nama anda :" + kalimat);
Console.ReadLine();

double j, g;
double k, m ;
Console.WriteLine(" Masukan Jam Kerja anda");
j = double.Parse(Console.ReadLine());
Console.WriteLine(" Masukan Jam lembur anda");
k = double.Parse(Console.ReadLine());

if (j <= 7)
{
g = j * 125000;
}
else
{
g = 875000 ;
}
if (k <= 5)
{
m = k * 50000;
}
else
{
m = 250000;
}
Console.WriteLine("Gaji anda = " + g.ToString());
Console.WriteLine("Upah Lembur anda = Rp. " + m.ToString());
Console.WriteLine("Total Gaji anda = Rp. " + g.ToString());
Console.ReadLine();

}
}
}

You might also like