1-Mavzu. Dasturlashda delegatlar, hodisalar, lyamda ifodalardan foydalanish. Saralash va izlash algoritmlari bilan tanishish


Natija: Dasturlashda WPF texnologiyasidan foydalanish


Download 0.92 Mb.
bet5/5
Sana05.05.2023
Hajmi0.92 Mb.
#1428336
1   2   3   4   5
Bog'liq
1-mavzu

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:





Download 0.92 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling