Aplikasi C# (C Sharp) Penjualan flasdisk berbasis console
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Menu
{
class Program
{
static void Main(string[] args)
{
string fd,wr,ex;
a:
Console.Clear();
Console.Write("Pilih Merk Flasdisk Kingston/Hp/Sandisk [K/H/S] : ");
fd = Console.ReadLine();
if (fd == "K" || fd == "k")
{
Console.Write("-----------Anda memilih Kingston-----------");
Console.Write("\n\nPilih Kapasitas [4/8/16] : ");
wr = Console.ReadLine();
if (wr == "4" || wr == "4")
{
Console.Write("-----------Anda memilih dengan Kapasitas 4GB-----------");
Console.Write("\n---->Harga Rp. 40.000");
}
else if (wr == "8" || wr == "8")
{
Console.Write("-----------Anda memilih dengan Kapasitas 8GB-----------");
Console.Write("\n---->Harga Rp. 80.000");
}
else if (wr == "16" || wr == "16")
{
Console.Write("-----------Anda memilih dengan Kapasitas 16GB-----------");
Console.Write("\n---->Harga Rp. 160.000");
}
else
{
Console.Write("Inputan Error");
}
}
else if (fd == "H" || fd == "h")
{
Console.Write("-----------Anda memilih HP----------");
Console.Write("\n\nPilih Kapasitas [4/8/16] : ");
wr = Console.ReadLine();
if (wr == "4" || wr == "4")
{
Console.Write("-----------Anda memilih dengan Kapasitas 4GB-----------");
Console.Write("\nHarga Rp. 45.000");
}
else if (wr == "8" || wr == "8")
{
Console.Write("-----------Anda memilih dengan Kapasitas 8GB-----------");
Console.Write("\nHarga Rp. 85.000");
}
else if (wr == "16" || wr == "16")
{
Console.Write("-----------Anda memilih dengan Kapasitas 16GB-----------");
Console.Write("\nHarga Rp. 165.000");
}
else
{
Console.Write("Inputan Error");
}
}
else if (fd == "S" || fd == "s")
{
Console.Write("-----------Anda memilih Sandisk-----------");
Console.Write("\n\nPilih Kapasitas [4/8/16] : ");
wr = Console.ReadLine();
if (wr == "4" || wr == "4")
{
Console.Write("-----------Anda memilih dengan Kapasitas 4GB-----------");
Console.Write("\nHarga Rp. 50.000");
}
else if (wr == "8" || wr == "8")
{
Console.Write("-----------Anda memilih dengan Kapasitas 8GB-----------");
Console.Write("\nHarga Rp. 90.000");
}
else if (wr == "16" || wr == "16")
{
Console.Write("-----------Anda memilih dengan Kapasitas 16GB-----------");
Console.Write("\nHarga Rp. 170.000");
}
else
{
Console.Write("Inputan Error");
}
}
else
{
Console.Write("Inputan Error");
}
Console.Write("\n---------------------------------------------");
Console.Write("\n\nAnda mau pesan lagi ? [Y/T] : ");
ex = Console.ReadLine();
if (ex =="Y" || ex =="y")
{
goto a;
}
Console.Read();
}
}
}
Comments
Post a Comment