Selasa, 10 Januari 2017

Pemograman Visual Studio C#

Assallamuallaikum Wr.Wb. :)😏

Ketemu lagi dengan saya yaa... 😁 , kali ini saya mau kasih kalian bocoran :v , bocoran apa sih kak 😅jadi kepo loh😛. Cara membuat kalkulator sederhana di C# , gimana kak caranya :v bagi dong :v
Nah saya mau kasih buat kalian ya sapa tau bermanfaat yaa kawan"😍


Kalulator Sederhana C#

pertama kalian harus membuat gambar di bawah ini👇👇👇













Kedua kalau kalian sudah membuat seperti gambar di atas ☝☝ lalu kalian isi rumusnya biar supaya progamnya bisa berjalan liat bawah ini...👇👇 dan jangan lupa pastikan progamnya jangan sampai ada yang salah yaaa....😉


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class Kalkulator : Form
    {
        public Kalkulator()
        {
            InitializeComponent();
        }

        private void Angka2_Click(object sender, EventArgs e)
        {

        }

        private void Angka1_Click(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            float a, b, c;
            a = float.Parse(this.textBox1.Text);
            b = float.Parse(this.textBox2.Text);
            c = a - b;
            this.textBox3.Text = Convert.ToString(c);
        }

        private void Kalkulator_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            float a, b, c;
            a = float.Parse(this.textBox1.Text);
            b = float.Parse(this.textBox2.Text);
            c = a + b;
            this.textBox3.Text = Convert.ToString(c);
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button3_Click(object sender, EventArgs e)
        {
            double a, b, c;
            a = Convert.ToDouble(this.textBox1.Text);
            b = Convert.ToDouble(this.textBox2.Text);
            c = Math.Round(a / b, 3);
            this.textBox3.Text = Convert.ToString(c);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            float a, b, c;
            a = float.Parse(this.textBox1.Text);
            b = float.Parse(this.textBox2.Text);
            c = a * b;
            this.textBox3.Text = Convert.ToString(c);
        }

        private void Clear_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = "";
            this.textBox2.Text = "";
            this.textBox3.Text = "";
        }


    }
}


Jika kalian sudah membuat progam tersebut dan tidak ada 1 pun yang salah dan hasilnya seperti gambar di bawah 👇👇












Alhamdulillah Berhasil 😊😊  Makasih yaa kak ;v , oke sama"
Terima kasih atas kedatangan anda , apa bila ada kata saya yang salah mohon maaf ya yang sebesarnya 🙏🙏 Jangan lupa Like & Comment yaa😊😉

Kalau mau tanya" email saya ada di bawah :

punkdimas911@gmail.com💀

Selasa, 15 November 2016

Rumus Bangun Ruang Melalui C#

Assallamuallaikum WR.WB

Ketemu Lagi Nih Sama Gua😂 , Gua Mau Kasih Rumus Bangun Ruang  C# Nih Gan , Mau Kagak :-P
Ya Pasti Mau Kan Gan , Nah Ini Rumus Bangun Ruang C#nya Ya Agan , Baca Sampek Gan :-)
Jangan Lupa Ya Gan Comment di Bawah ⇓ 😍😉

RUMUS BANGUN RUANG

Kita akan Membuat Rumus Bangun Ruang di C# :-) (Visual Studio)

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

namespace Bangun_Ruang_DimasCR
{
    class Program
    {
        static void Main(string[] args)
        {
        Volume:
            Console.WriteLine("Rumus Untuk Menghitung Volume Bangun Ruang");
            Console.WriteLine("1.Balok");
            Console.WriteLine("2.Kubus");
            Console.WriteLine("3.Tabung");
            Console.Write("Pilihlah Salah Satu Bangun Ruang Di atas : ");
            int a = Convert.ToInt16(Console.ReadLine());
            switch (a)
            {
                case 1:
                    Console.Write("Masukkan Panjang Balok :");
                    float p = Convert.ToInt16(Console.ReadLine());
                    Console.Write("Masukkan Lebar Balok :");
                    float l = Convert.ToInt16(Console.ReadLine());
                    Console.Write("Masukkan Tinggi Balok :");
                    float t = Convert.ToInt16(Console.ReadLine());
                    Console.WriteLine("Rumus untuk mencari Volumenya : p * l * t ");
                    float vb = p * l * t;
                    Console.Write("Jadi Volume Balok : {0}", vb);
                    Console.ReadLine();
                    goto Volume;
                case 2:
                    Console.Write("Masukkan Rusuk Kubus :");
                    float rusuk = Convert.ToInt16(Console.ReadLine());
                    Console.WriteLine("Rumus untuk mencari Volumenya : rusuk * rusuk * rusuk");
                    float vk = rusuk * rusuk * rusuk;
                    Console.Write("Jadi Volume Kubus :{0}", vk);
                    Console.ReadLine();
                    goto Volume;
                case 3:
                    float phi = 3.14f;
                    Console.Write("Masukkan Jari-Jari Tabung :");
                    float r = Convert.ToInt16(Console.ReadLine());
                    Console.Write("Masukkan Tinggi Tabung :");
                    float tt = Convert.ToInt16(Console.ReadLine());
                    Console.WriteLine("Rumus untuk mencari Volumenya : phi * r * r * tt");
                    float vt = phi * r * r * tt;
                    Console.Write("Jadi Volume Tabung :{0}", vt);
                    Console.ReadLine();
                    goto Volume;
            }
        }
    }
}

Nih Gambar Hasilnya



Thanks Guys Silahkan Mencoba ya :-)
Sosmed saya
IG : dimas.cr
Line : anjay1927
FB : dimascr