0% found this document useful (0 votes)
30 views3 pages

Using Using Using Using Namespace Class Static Void String

The document contains code for a C# program that asks the user to input income details for two families, including the father's income, mother's income, child's income and other income. It then calculates the total income for each family and determines if they qualify for a car loan based on having an income of over 1 million. It outputs a table showing the income details and loan qualification for each family.

Uploaded by

Irman Sempunk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Using Using Using Using Namespace Class Static Void String

The document contains code for a C# program that asks the user to input income details for two families, including the father's income, mother's income, child's income and other income. It then calculates the total income for each family and determines if they qualify for a car loan based on having an income of over 1 million. It outputs a table showing the income details and loan qualification for each family.

Uploaded by

Irman Sempunk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

using

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("*==========================================================
====*");

Console.WriteLine(" || No || NAMA KELUARGA ||


||");
Console.WriteLine(" ||
||
===================================||");
Console.WriteLine(" ||
|| Ayah
||Lain - lain||");
PENDAPATAN

|| 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 :

You might also like