14 Aralık 2014 Pazar

C# Matrise Eleman Girişi Kodları

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



        private void button1_Click(object sender, EventArgs e)
        {
            int[,] matris = new int[3, 2];
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 2; j++)
               matris[i,j]=int.Parse(Microsoft.VisualBasic.Interaction.InputBox("dizinin"+(i+1)+".satır"+(j+1)+".sütun değerini gir","","",20,20));
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    textBox1.Text = textBox1.Text + " " + matris[i, j].ToString();
                 
                }
                textBox1.Text = textBox1.Text + "\r\n";
             
            }
        }

    }
}
Paylaş:

0 yorum:

Yorum Gönder

Popüler

Son

Kategoriler

Arşiv