C# Ay Gün Hesaplama Programı - C # Month and Day Calculator
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 AyGunHesapla
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
label1.Text = "AY NO:";
button1.Text = "GÜN SAYISI";
}
private void button1_Click(object sender, EventArgs e)
{
int ayNo = Convert.ToInt32(textBox1.Text);
if (ayNo < 1 || ayNo > 12)
MessageBox.Show("Geçersiz ay numarası girdiniz");
else if (ayNo == 1 || ayNo == 3 ||
ayNo == 5 || ayNo == 7 || ayNo == 8
|| ayNo == 10 || ayNo == 12)
MessageBox.Show("Ay içerisinde 31 gün vardır");
else if (ayNo == 4 || ayNo == 6 || ayNo == 9 || ayNo == 11)
MessageBox.Show("Ay içerisinde 30 gün vardır");
else
MessageBox.Show("Ay içerisinde 28 gün vardır");
}
}
}
C# Ay Gün Hesaplama Programı - C # Month and Day Calculator
Reviewed by MARS
on
Eylül 11, 2017
Rating:

Hiç yorum yok: