C#.NET Program 3

Output:
















Code:

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 Question_2__Loan_Calculator_
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            label4.Visible = true;
            pmt();
        }
        private void pmt()
        {
            double a, b, c, d;
            double e;

            a = Int32.Parse(textBox1.Text);
            b = Int32.Parse(textBox2.Text);
            c = Int32.Parse(textBox3.Text);

            d = (a * b) / c;

            if (checkBox1.Checked)
            {
                e = (a * 10) / 100;
                d = d - e;
            }

            label4.Text = d.ToString() + " Payable Amount Per Month";
            
        }

       
    }
}

No comments:

Post a Comment