1-) C# - Yeni konu Yeni soru
using System;
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;
namespace Yenikonu
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//Soru= 1 den 4 e kadar 4 de dahil 2 kere yazdır 1,2,3,4,1,2,3,4..
/*int k = 0; // 1. YOL..
for (int i = 1; i < 5; i++)
{
Console.WriteLine(i);
if (i == 4)
{
i = 0;
k = k + 1;
}
if (k==2)
{
break;
}
}*/
//yaz(); //2.YOL 1..
//yaz();
/*for (int i = 0; i < 2; i++) //2.YOL 2..
{
yaz();
}*/
/*int bir = 0; // 3.YOL..
int iki = 0;
for (int i = 0; i < 8; i++)
{
if (i<4)
{
bir++;
Console.WriteLine(bir);
}
else
{
iki++;
Console.WriteLine(iki);
}
}*/
/*string yaz = ""; //4.YOL..
for (int i = 1; i < 5; i++)
{
yaz = yaz + i + "\n";
}
Console.WriteLine(yaz);
Console.WriteLine(yaz);*/
}
/*public void yaz() //2.yol
{
for (int i = 1; i < 5; i++)
{
Console.WriteLine(i);
}
}*/
}
}