c# |
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 WindowsFormsApplication11
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Random r;
int a, b, dcs = 0, sn = 0, ycs = 0, bcs = 0, sure = 10;
private void Form1_Load(object sender, EventArgs e)
{
soru();
timer1.Start();
}
void soru()
{
sn++;
label1.Text = "soru" + sn + ")";
a = r.Next(1, 100);
b = r.Next(1, 100);
label2.Text = a.ToString();
label4.Text = b.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
int c = Convert.ToInt32(textBox1.Text);
if (c==a+b)
{
dcs++;
label9.Text = dcs + "";
}
else
{
ycs++;
label10.Text = ycs + "";
}
soru();
sure = 10;
}
private void timer1_Tick(object sender, EventArgs e)
{
sure--;
if (sure==0)
{
bcs++;
label11.Text = bcs + "";
soru();
sure = 10;
}
label13.Text = sure.ToString();
}
}
}
Sitemizin daha kaliteli paylaşımları yapabilmesi için sizin yorumlarınıza ihtiyacımız var :)
0 yorum :
Yorum Gönder