1-) C# - 4 satır ve 4 stundan oluşan işlem
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GENEL
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Random a = new Random();
int[,] b = new int[4, 4];
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
int c = 1;
if (c == 1)
{
if (i == 0)
{
b[0, 0] = c;
b[1, 0] = c;
b[2, 0] = c;
b[3, 0] = c;
}
}
}
for (int j = 0; j < 4; j++)
{
int c = 2;
if (c == 2)
{
if (i == 1)
{
b[0, 1] = c;
b[1, 1] = c;
b[2, 1] = c;
b[3, 1] = c;
}
}
}
for (int j = 0; j < 4; j++)
{
int c = 3;
if (c == 3)
{
if (i == 2)
{
b[0, 2] = c;
b[1, 2] = c;
b[2, 2] = c;
b[3, 2] = c;
}
}
}
for (int j = 0; j < 4; j++)
{
int c = 4;
if (c == 4)
{
if (i == 3)
{
b[0, 3] = c;
b[1, 3] = c;
b[2, 3] = c;
b[3, 3] = c;
}
}
}
}
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
Console.WriteLine(i + ". satır " + j + ".sütun " + b[i,j]);
}
}
}
}
}
2. ÖDEV ********************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GENEL
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
int[,] dizi = new int[4, 4];
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
dizi[i, j] = i + 1;
Console.WriteLine(i + ". satır " + j + ".sütun " + dizi[i, j]);
}
}
}
}
}