Natija:
Dasturlashda WPF texnologiyasidan foydalanish.
Windows Form Application muhitida ikki sonning yig`indisini kvadratini topish dasturini tuzamiz. (a+b)2
Avval bu ko`rinishga keltirish uchun kerakli buyruq va algoritmlar tuziladi. Keyin dasturini tuzamiz:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Rahmanov_Xurshidbek
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent()
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
void Button1Click(object sender, EventArgs e)
{
double a=double.Parse(textBox1.Text);
double b=double.Parse(textBox2.Text);
double yechim;
yechim=Math.Pow(a+b,2);
label3.Text=Convert.ToString(yechim); } } }
Natija:
Do'stlaringiz bilan baham: |