Monday, 5 January 2015

Contoh Script c# penjualan

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Menu:

            Console.WriteLine("Menu Pilihan");
            Console.WriteLine("1. Slow Rock Album");
            Console.WriteLine("2. Pop Rock Album");
            Console.WriteLine("3. Classic Album");
            Console.WriteLine("Masukkan Pilihan Album Anda [1,2,3]: ");
            int pil;
            string input;
            input = Console.ReadLine();
            int.TryParse(input, out pil);
            Console.Clear();


            if (pil == 1)
            {
                Console.WriteLine("Album pilihan 1");
                Console.WriteLine("1. BEAST");
                Console.WriteLine("2. 4Minute");
                Console.ReadLine();
                Console.Clear();
                goto Menu;
             
            }
            else if (pil == 2)
            {
                Console.WriteLine("Album pilihan 2");
                Console.WriteLine("1. Super Junior");
                Console.WriteLine("2. 2PM");
                Console.ReadLine();
                Console.Clear();
                goto Menu;
            }
            else if(pil ==3 )
            {
                Console.WriteLine("Album pilihan 3");
                Console.WriteLine("1. 2NE1");
                Console.WriteLine("2. Miss A");
                Console.ReadLine();
                Console.Clear();
                goto Menu;
            }

        }
    }

}

Download script Link1 / Link2

2 comments: