Professional Documents
Culture Documents
ادخال عناصر مصفوفة وطباعتها وطباعة العدد الأكبر والأصغر في لائحة
ادخال عناصر مصفوفة وطباعتها وطباعة العدد الأكبر والأصغر في لائحة
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualBasic;
namespace WindowsFormsApplication60
{
public partial class Form1 : Form
{
int i, j, max, min;
int[,] arr = new int[3, 3];
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
arr[i, j] = Convert.ToInt16(Interaction.InputBox("name" + i + j, "inter"));
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
{
listBox1.Items.Add(arr[i, j]);