Professional Documents
Culture Documents
Using Using Using Using Namespace Class Static Void String
Using Using Using Using Namespace Class Static Void String
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace latihanprogramif
{
class Program
{
static void Main(string[] args)
{
Console.Write("Masukan Nama Keluarga 1 : ");
String kel1 = Console.ReadLine();
Console.Write("\nPendapatan Ayah
: Rp.");
float ayah1 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nPendapatan Ibu
: Rp.");
float ibu1 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nPendapatan Anak
: Rp.");
float anak1 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nPendapatan Lain - lain : Rp.");
float LL1 = Convert.ToInt32(Console.ReadLine());
Console.Write("\n\nMasukan Nama Keluarga 2 : ");
String kel2 = Console.ReadLine();
Console.Write("\nPendapatan Ayah
: Rp.");
float ayah2 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nPendapatan Ibu
: Rp.");
float ibu2 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nPendapatan Anak
: Rp.");
float anak2 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nPendapatan Lain - lain : Rp.");
float LL2 = Convert.ToInt32(Console.ReadLine());
float pend1 = (ayah1) + (ibu1 * (1 / 2)) + (anak1 * (1 / 4)) +
(LL1 * (1 / 3));
float pend2 = (ayah2) + (ibu2 * (1 / 2)) + (anak2 * (1 / 4)) +
(LL2 * (1 / 3));
String maka1;
if (pend1 >= 1000000 )
maka1 = "Selamat Anda Mendapatkan Kredit Mobil";
else
maka1 = "Maaf Anda Kurang Beruntung";
String maka2;
if (pend2 >= 1000000)
maka2 = "Selamat Anda Mendapatkan Kredit Mobil";
else
maka2 = "Maaf Anda Kurang Beruntung";
Console.WriteLine("
Console.WriteLine("
Hasil Rekapitulasi");
Kredit Kendaraan");
Console.WriteLine("*==========================================================
====*");
|| Ibu || Anak
Console.WriteLine("*==========================================================
=====*");
Console.WriteLine(" || 1. || " + kel1 + "
|| " + ayah1 + "
||"+ ibu1 + "||" + anak1 + "||" + LL1 + "||");
Console.WriteLine(" || 2. || " + kel2 + "
|| " + ayah2 + "
||"+ ibu2 + "||" + anak2 + "||" + LL2 + "||");
Console.WriteLine("*==========================================================
=====*");
Console.WriteLine("\nKeterangan :");
Console.WriteLine("\nKeluarga " +kel1 + "{0}",maka1);
Console.WriteLine("\n\nKeluarga " +kel2 + "{0}" ,maka2);
}
}
OUTPUT :